RPC: Provide out-of-date timestamp

Convert the "OutOfDate" field to provide a timestamp instead of a
boolean flag in JSON results. We don't really care about backward
compatibility here, as most AUR helpers would break anyway when trying
to parse RPC responses after the data type overhaul that should come
with one of the following patches.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2011-09-23 13:48:42 +02:00
parent 675b7e3d02
commit 04a0fd4748

View file

@ -18,9 +18,8 @@ class AurJSON {
'search', 'info', 'multiinfo', 'msearch' 'search', 'info', 'multiinfo', 'msearch'
); );
private static $fields = array( private static $fields = array(
'Packages.ID', 'Name', 'Version', 'CategoryID', 'Packages.ID', 'Name', 'Version', 'CategoryID', 'Description', 'URL',
'Description', 'URL', 'License', 'License', 'NumVotes', 'OutOfDateTS AS OutOfDate',
'NumVotes', '(OutOfDateTS IS NOT NULL) AS OutOfDate',
'SubmittedTS AS FirstSubmitted', 'ModifiedTS AS LastModified' 'SubmittedTS AS FirstSubmitted', 'ModifiedTS AS LastModified'
); );