summaryrefslogtreecommitdiffstats
path: root/web/lib/pkgbasefuncs.inc.php
diff options
context:
space:
mode:
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);