[aur-dev] [PATCH] add first submitted and last modified to rpc output

elij elij.mx at gmail.com
Thu May 12 17:34:06 EDT 2011


On Thu, May 12, 2011 at 4:42 AM, kachelaqa <kachelaqa at gmail.com> wrote:
> 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.

I like this patch now, if that counts for anything. :P

> 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.
>
> ---
>  web/lib/aurjson.class.php |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php
> index 50cf6d0..cad722e 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'
>     );
>
>     /**
> --
> 1.7.5.1
>
>


More information about the aur-dev mailing list