Commit graph

29 commits

Author SHA1 Message Date
Dan McGee
8fdb382d67 Don't allow dl() of json module
You need this enabled for the AUR, period. No need for this BS.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-13 12:36:07 +02:00
Dan McGee
7c91c59245 Remove Dummy Package concept
Instead, we just store dependencies directly in the PackageDepends
table. Since we don't use this info anywhere besides the package details
page, there is little value in precalculating what is in the AUR vs.
what is not.

An upgrade path is provided via several SQL statements in the UPGRADING
document. There should be no user-visible change from this, but the DB
schema gets a bit more sane and we no longer have loads of junk packages
in our tables that are never shown to the end user. This should also
help the MySQL query planner in several cases as we no longer have to be
careful to exclude dummy packages on every query.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-03 22:59:32 +02:00
Dan McGee
7f5af61c88 Drop PackageLocations table and references
We don't need this anymore since all packages managed here are
well...managed here. Rip out all of the places we were using this field,
many of which depended on the magic value '2' anyway.

On the display side of things, we had a column that was always showing
'unsupported' that is now gone, and you can no longer sort by this column.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-01 12:41:08 +01:00
Lukas Fleischer
da2ebb667b aurjson: Escape wildcards in "LIKE" patterns (fixes FS#18626).
Percent signs ("%") and underscores ("_") are not escaped by
mysql_real_escape_string() and are interpreted as wildcards if combined
with "LIKE", so we need to deal with them separately.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-01-28 16:54:58 +01:00
Lukas Fleischer
556de318ae Build URLs from package names (fixes FS#15308, FS#19327).
Drop the "URLPath" field from the "Packages" table, build URLs from
package names instead.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-01-24 18:08:29 +01:00
Lukas Fleischer
eda713032c Add timestamp when a package is flagged out-of-date (FS#20848).
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
- resolve conflict and omit i18n changes.
2010-11-10 14:50:35 -05:00
Loui Chang
92b19e78ac aurjson: Only return an error string if utf8_encode returns an empty string.
This allows 0 and '0' values to pass.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-10-23 12:35:02 -04:00
Loui Chang
21e0ff2207 Fix json info output.
Commit 325347a introduced a regression causing an improper database
query.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-10-01 16:41:22 -04:00
elij
325347a268 Add maintainer search to json interface. Closes FS#15947
Fix for maintainer search ticket: FS#15947
Also http://mailman.archlinux.org/pipermail/aur-dev/2009-September/000892.html

Fixed some problems with selecting the proper data fields in the
original patch. - Loui

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-09-28 15:44:31 -04:00
elij
a6d5cb71a6 fix content-type when sending jsonp
jsonp callback should have a content type of text/javascipt,
since it specifies a callback function wrapping json data,
and is not soley json data.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-09-28 15:17:07 -04:00
Gergely Imreh
4d1eb4dd7a Fix: FS#15526 non-UTF8 character in rpc output
Currently AUR does not check the uploaded packages, whether they are
correctly in UTF8 encoding. If there are fields (such as $pkgdesc)
that contain such non-UTF8 characters, the rpc interface chokes on
those fields: even if there's data successfully retrieved from the
database, rpc returns "null".
In an effort to make such errors in the PKGBUILDs debugged more easily,
let's force rpc to have more useful output: try to convert non-UTF8
fields to UTF8. If it's a success, good. Partial success (some characters
showing as \uXXXX) is ok. Failure results in error message printed to that
field.

Signed-off-by: Gergely Imreh <imrehg@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-09-16 07:50:44 -04:00
Loui Chang
1bf54a32c4 aurjson: Use call_user_func to call functions.
call_user_func_array is unnecessary.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-09-14 17:03:50 -04:00
Dan McGee
46f2798524 Use include_once where applicable
All of these are sourcing function libraries so we don't need to include
them more than once. Things that insert actual HTML into the output were
left calling include().

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-08-11 13:58:12 -04:00
Loui Chang
610733eafd Remove excess whitespace.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-06-25 00:05:44 -04:00
Loui Chang
ec214fdb42 Remove author information from scripts.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-04-12 23:02:08 -04:00
Loui Chang
d57b28ac7e Add LocationID to returned fields in json interface.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-03-03 22:28:48 -05:00
Dan McGee
0caa949e41 rpc: delay getting DB connection until absolutely necessary
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-15 14:30:35 -05:00
Loui Chang
1e9147a352 Return CategoryID from the json interface.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-23 13:41:38 -05:00
Loui Chang
1deb924674 Make JSON search return more information.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-07-16 18:16:04 -04:00
eliott
cc1f323d32 Added AurJson query length limit.
Set a limit on the length of the query argument for searching.
A search of zero length returns a considerably sized result set.

Signed-off-by: eliott <eliott@cactuswax.net>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-06-05 21:21:21 -04:00
Loui Chang
fca67672fd One more json fix 2008-03-23 03:04:16 -05:00
Loui Chang
541ea8aacc Fixed a couple more lingering JSON bugs
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Simo Leone <simo@archlinux.org>
2008-03-23 03:04:16 -05:00
Simo Leone
9254804e1e Fixed operator precendence in aurjson
My bad

Signed-off-by: Simo Leone <simo@archlinux.org>
2008-03-23 03:04:16 -05:00
Simo Leone
196543a9e7 Make JSON interface work
Now makes sure json php module is loaded,
also fixed a few coding errors and made
the search behave like the search on the
web interface.

Signed-off-by: Simo Leone <simo@archlinux.org>
2008-03-23 03:04:16 -05:00
Callan Barrett
8c94552042 Add notify column in search results and notify button
Adds a column to search results showing if a package has comment
notification enabled and adds support for toggling notify for
multiple packages from search

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-01-20 00:21:19 -06:00
eliott
32b863203f Modified to get details based on an exact package name, or based on a package id. 2008-01-20 00:21:19 -06:00
eliott
47e80c24af Removed reference to 'safe' 2008-01-20 00:21:19 -06:00
eliott
36dd7736c9 Moved usage documentation out of the class.
Fixed an issue in the handle class.
2008-01-19 23:49:35 -06:00
eliott
5e38e3d3d0 Added AurJSON code.
Added a JSON interface to the aur. This should make it easier for developers to integrate
command line utilities and poll against the AUR itself.
2008-01-19 23:49:35 -06:00