summaryrefslogtreecommitdiffstats
path: root/web/lib/pkgbasefuncs.inc.php
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-07-04 12:28:12 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-07-04 12:28:12 +0200
commit111d836912f403caf82abe6f2ff6c0fee9f3f6b3 (patch)
tree3f108c08a6408683366aa07173f8a65c2e1aa460 /web/lib/pkgbasefuncs.inc.php
parent7f29756196ce8743c474bb035d234a72af5381aa (diff)
downloadaur-111d836912f403caf82abe6f2ff6c0fee9f3f6b3.tar.gz
aur-111d836912f403caf82abe6f2ff6c0fee9f3f6b3.tar.xz
Display number of pending requests in actions box
For packages with pending package requests, display the number of requests above the "File Request" link. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib/pkgbasefuncs.inc.php')
-rw-r--r--web/lib/pkgbasefuncs.inc.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php
index fed46c86..b357dff3 100644
--- a/web/lib/pkgbasefuncs.inc.php
+++ b/web/lib/pkgbasefuncs.inc.php
@@ -187,7 +187,10 @@ function pkgbase_get_details($base_id) {
$q.= "PackageBases.OutOfDateTS, PackageBases.SubmittedTS, ";
$q.= "PackageBases.ModifiedTS, PackageBases.SubmitterUID, ";
$q.= "PackageBases.MaintainerUID, PackageBases.PackagerUID, ";
- $q.= "PackageCategories.Category ";
+ $q.= "PackageCategories.Category, ";
+ $q.= "(SELECT COUNT(*) FROM PackageRequests ";
+ $q.= " WHERE PackageRequests.PackageBaseID = PackageBases.ID ";
+ $q.= " AND PackageRequests.Status = 0) AS RequestCount ";
$q.= "FROM PackageBases, PackageCategories ";
$q.= "WHERE PackageBases.CategoryID = PackageCategories.ID ";
$q.= "AND PackageBases.ID = " . intval($base_id);