[aur-dev] [PATCH 1/2] RPC: Provide out-of-date timestamp

Lukas Fleischer archlinux at cryptocrack.de
Fri Sep 23 09:36:23 EDT 2011


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 at cryptocrack.de>
---
 web/lib/aurjson.class.php |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php
index b596359..b4648c9 100644
--- a/web/lib/aurjson.class.php
+++ b/web/lib/aurjson.class.php
@@ -18,9 +18,8 @@ class AurJSON {
         'search', 'info', 'multiinfo', 'msearch'
     );
     private static $fields = array(
-        'Packages.ID', 'Name', 'Version', 'CategoryID',
-        'Description', 'URL', 'License',
-        'NumVotes', '(OutOfDateTS IS NOT NULL) AS OutOfDate',
+        'Packages.ID', 'Name', 'Version', 'CategoryID', 'Description', 'URL',
+        'License', 'NumVotes', 'OutOfDateTS AS OutOfDate',
         'SubmittedTS AS FirstSubmitted', 'ModifiedTS AS LastModified'
     );
 
-- 
1.7.6.3



More information about the aur-dev mailing list