Message info
 
To:aur-dev@archlinux.org From:Dario Giovannetti Subject:[aur-dev] [PATCH] [FS#28839] Query package details directly by name Date:Fri, 09 Mar 2012 14:08:35 +0100
 

Currently package-detail pages are retrieved only with "packages.php?ID=#".

I've attached two possible patches to bug report FS#28839 (
https://bugs.archlinux.org/task/28839 ) that could enable querying by
package name: the first one just adds an elseif in packages.php, the
second one rewrites an if block avoiding some duplication of code.

PATCH_1: https://bugs.archlinux.org/task/28839?getfile=8371
PATCH_2: https://bugs.archlinux.org/task/28839?getfile=8372

A new GET variable is introduced, "NAME", and this way package details
could be queried also with "packages.php?NAME=pkgname". If "NAME"
conflicts with an existing variable, possible alternatives are "PNAME",
"PKGNAME", "pkgname" and so on.

Note that the patches use `urldecode($_GET['NAME'])`, so names should be
obviously url-encoded in the string. This is already supported by
https://wiki.archlinux.org/index.php/Template:AUR

This request is the result of the discussion in
https://wiki.archlinux.org/index.php/User_talk:Det#Templates%20vs%20links.

Thank you,

Dario