From 36ee5561035af335bc3c900ded7aa89066421226 Mon Sep 17 00:00:00 2001 From: Loui Chang Date: Tue, 24 Jun 2008 02:53:16 -0400 Subject: Move code out of index.php Move database queries to functions and html to templates. Signed-off-by: Loui Chang --- web/lib/stats.inc | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 web/lib/stats.inc (limited to 'web/lib/stats.inc') diff --git a/web/lib/stats.inc b/web/lib/stats.inc new file mode 100644 index 00000000..e659210f --- /dev/null +++ b/web/lib/stats.inc @@ -0,0 +1,72 @@ += $targstamp OR Packages.ModifiedTS >= $targstamp)"; + $result = db_query($q, $dbh); + $row = mysql_fetch_row($result); + $update_count = $row[0]; + + include('stats/general_stats_table.php'); +} + -- cgit v1.2.3-24-g4f1b From 78ace0914eb6a8c6cc39306ab586ab741aa25187 Mon Sep 17 00:00:00 2001 From: Loui Chang Date: Sun, 5 Oct 2008 20:24:57 -0400 Subject: Show developer-TUs their total community packages. This closes: FS#11561 - Devs in AUR can't see their packages in Community Thanks to Hugo Doria for the original patch. Signed-off-by: Loui Chang Signed-off-by: Callan Barrett --- web/lib/stats.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/lib/stats.inc') diff --git a/web/lib/stats.inc b/web/lib/stats.inc index e659210f..6fbc0334 100644 --- a/web/lib/stats.inc +++ b/web/lib/stats.inc @@ -29,7 +29,7 @@ function user_table($user, $dbh) # If the user is a TU calculate the number of the packages $atype = account_from_sid($_COOKIE["AURSID"]); - if ($atype == 'Trusted User') { + if (($atype == 'Trusted User') || ($atype == 'Developer')) { $result = db_query(sprintf($base_q, 'community'), $dbh); $row = mysql_fetch_row($result); $maintainer_community_count = $row[0]; -- cgit v1.2.3-24-g4f1b