summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorkachelaqa <kachelaqa@gmail.com>2011-05-12 12:42:36 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2011-05-17 10:46:56 +0200
commit0df6d7b4e7e3735365921ef494ed66738cf53a6b (patch)
treed97516c81c2b0425557684772b375329f951b6ba /web
parent77f3aa56b7bbb70534cdea52ab9c9978e74df525 (diff)
add first submitted and last modified to rpc output
after reading the discussion about the submitter field, i looked again at my previous patch and realized that it was not very good at all. hopefully this simplified version will be more acceptable. the justification for this patch is that many third-party tools will want to know how new a package is, or when it last changed. adding the submitted and modified timestamps will allow users to get all the relevant package data in a single query. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web')
-rw-r--r--web/lib/aurjson.class.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php
index a96cc4b..0f8e2fa 100644
--- a/web/lib/aurjson.class.php
+++ b/web/lib/aurjson.class.php
@@ -20,7 +20,8 @@ class AurJSON {
private static $fields = array(
'Packages.ID', 'Name', 'Version', 'CategoryID',
'Description', 'URL', 'License',
- 'NumVotes', '(OutOfDateTS IS NOT NULL) AS OutOfDate'
+ 'NumVotes', '(OutOfDateTS IS NOT NULL) AS OutOfDate',
+ 'SubmittedTS AS FirstSubmitted', 'ModifiedTS AS LastModified'
);
/**