diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-07-04 12:28:12 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-07-04 12:28:12 +0200 |
commit | 111d836912f403caf82abe6f2ff6c0fee9f3f6b3 (patch) | |
tree | 3f108c08a6408683366aa07173f8a65c2e1aa460 /web/lib/pkgfuncs.inc.php | |
parent | 7f29756196ce8743c474bb035d234a72af5381aa (diff) |
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/pkgfuncs.inc.php')
-rw-r--r-- | web/lib/pkgfuncs.inc.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php index 7e65d09..a2b8a0d 100644 --- a/web/lib/pkgfuncs.inc.php +++ b/web/lib/pkgfuncs.inc.php @@ -401,7 +401,10 @@ function pkg_get_details($id=0) { $q.= "PackageBases.NumVotes, PackageBases.OutOfDateTS, "; $q.= "PackageBases.SubmittedTS, PackageBases.ModifiedTS, "; $q.= "PackageBases.SubmitterUID, PackageBases.MaintainerUID, "; - $q.= "PackageBases.PackagerUID, PackageCategories.Category "; + $q.= "PackageBases.PackagerUID, PackageCategories.Category, "; + $q.= "(SELECT COUNT(*) FROM PackageRequests "; + $q.= " WHERE PackageRequests.PackageBaseID = Packages.PackageBaseID "; + $q.= " AND PackageRequests.Status = 0) AS RequestCount "; $q.= "FROM Packages, PackageBases, PackageCategories "; $q.= "WHERE PackageBases.ID = Packages.PackageBaseID "; $q.= "AND PackageBases.CategoryID = PackageCategories.ID "; |