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>
This commit is contained in:
kachelaqa 2011-05-12 12:42:36 +01:00 committed by Lukas Fleischer
parent 77f3aa56b7
commit 0df6d7b4e7

View file

@ -20,7 +20,8 @@ class AurJSON {
private static $fields = array( private static $fields = array(
'Packages.ID', 'Name', 'Version', 'CategoryID', 'Packages.ID', 'Name', 'Version', 'CategoryID',
'Description', 'URL', 'License', 'Description', 'URL', 'License',
'NumVotes', '(OutOfDateTS IS NOT NULL) AS OutOfDate' 'NumVotes', '(OutOfDateTS IS NOT NULL) AS OutOfDate',
'SubmittedTS AS FirstSubmitted', 'ModifiedTS AS LastModified'
); );
/** /**