From 298e5ffeeae46f1c8924d3c81ed7b23765a96ce9 Wed, 21 Mar 2012 17:36:20 +0100 From: Dario Giovannetti Date: Wed, 21 Mar 2012 17:34:54 +0100 Subject: [PATCH] Query package details directly by name diff --git a/web/html/packages.php b/web/html/packages.php index dc06c7e..0ab5af5 100644 --- a/web/html/packages.php +++ b/web/html/packages.php @@ -7,6 +7,11 @@ include_once('pkgfuncs.inc.php'); # package specific functions check_sid(); # see if they're still logged in +# Allow querying directly by URL-encoded package name +if (isset($_GET['NAME']) && !isset($_GET['ID'])) { + $_GET['ID'] = pkgid_from_name(urldecode($_GET['NAME'])); +} + # Set the title to the current query if required if (isset($_GET['ID']) && ($pkgname = pkgname_from_id($_GET['ID']))) { $title = $pkgname;