diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-06-24 23:22:08 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-06-25 11:33:29 +0200 |
commit | 8260111bcce49b73bd4973ae80296c913af2631d (patch) | |
tree | a3f7c8b2d4fe8005f632445d1b4c3b2d92b1533b /web/lib | |
parent | 48cc8207bf88beaaedd21ef271b1d012f3e18686 (diff) | |
download | aur-8260111bcce49b73bd4973ae80296c913af2631d.tar.gz aur-8260111bcce49b73bd4973ae80296c913af2631d.tar.xz |
Add a package request list
Introduce a new navigation point "Requests" that shows a list of pending
package requests. This functionality is only available to Trusted Users.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib')
-rw-r--r-- | web/lib/pkgbasefuncs.inc.php | 20 | ||||
-rw-r--r-- | web/lib/routing.inc.php | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php index a9fe9494..505bb511 100644 --- a/web/lib/pkgbasefuncs.inc.php +++ b/web/lib/pkgbasefuncs.inc.php @@ -964,6 +964,26 @@ function pkgbase_update_category($base_id, $category_id) { } /** + * Get a list of all package requests + * + * @return array List of pacakge requests with details + */ +function pkgbase_request_list() { + $dbh = DB::connect(); + + $q = "SELECT PackageRequests.ID, "; + $q.= "PackageRequests.PackageBaseID AS BaseID, "; + $q.= "PackageRequests.PackageBaseName AS Name, "; + $q.= "RequestTypes.Name AS Type, PackageRequests.Comments, "; + $q.= "Users.Username AS User, PackageRequests.RequestTS "; + $q.= "FROM PackageRequests INNER JOIN RequestTypes ON "; + $q.= "RequestTypes.ID = PackageRequests.ReqTypeID "; + $q.= "INNER JOIN Users ON Users.ID = PackageRequests.UsersID"; + + return $dbh->query($q)->fetchAll(); +} + +/** * File a deletion/orphan request against a package base * * @global string $AUR_LOCATION The AUR's URL used for notification e-mails diff --git a/web/lib/routing.inc.php b/web/lib/routing.inc.php index 1b2aa52b..5836a137 100644 --- a/web/lib/routing.inc.php +++ b/web/lib/routing.inc.php @@ -5,6 +5,7 @@ $ROUTES = array( '/index.php' => 'home.php', '/packages' => 'packages.php', '/pkgbase' => 'pkgbase.php', + '/requests' => 'pkgreq.php', '/register' => 'account.php', '/account' => 'account.php', '/accounts' => 'account.php', |