summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-05-31 11:45:00 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-05-31 11:45:00 +0200
commitd909ffcb17b81c617466f4437b696adb9a8d5144 (patch)
tree44ecc23c8a08393339a9d229f8afbf4def2a5465
parent86de2e562858d609709cada05f75fe3ec3779f5a (diff)
downloadaurweb-d909ffcb17b81c617466f4437b696adb9a8d5144.tar.xz
aurjson: Add a PackageBaseID field
This is useful to tools that automatically generate requests to orphan, delete or merge packages. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
-rw-r--r--web/lib/aurjson.class.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php
index 983e751..9abb2d6 100644
--- a/web/lib/aurjson.class.php
+++ b/web/lib/aurjson.class.php
@@ -17,6 +17,7 @@ class AurJSON {
);
private static $fields_v1 = array(
'Packages.ID', 'Packages.Name',
+ 'PackageBases.ID AS PackageBaseID',
'PackageBases.Name AS PackageBase', 'Version', 'CategoryID',
'Description', 'URL', 'NumVotes', 'OutOfDateTS AS OutOfDate',
'Users.UserName AS Maintainer',
@@ -25,14 +26,15 @@ class AurJSON {
);
private static $fields_v2 = array(
'Packages.ID', 'Packages.Name',
+ 'PackageBases.ID AS PackageBaseID',
'PackageBases.Name AS PackageBase', 'Version', 'CategoryID',
'Description', 'URL', 'NumVotes', 'OutOfDateTS AS OutOfDate',
'Users.UserName AS Maintainer',
'SubmittedTS AS FirstSubmitted', 'ModifiedTS AS LastModified'
);
private static $numeric_fields = array(
- 'ID', 'CategoryID', 'NumVotes', 'OutOfDate', 'FirstSubmitted',
- 'LastModified'
+ 'ID', 'PackageBaseID', 'CategoryID', 'NumVotes', 'OutOfDate',
+ 'FirstSubmitted', 'LastModified'
);
/*