From 0df6d7b4e7e3735365921ef494ed66738cf53a6b Mon Sep 17 00:00:00 2001 From: kachelaqa Date: Thu, 12 May 2011 12:42:36 +0100 Subject: 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 --- web/lib/aurjson.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'web') diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php index a96cc4b5..0f8e2fa5 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' ); /** -- cgit v1.2.3-24-g4f1b