summaryrefslogtreecommitdiffstats
path: root/web/lib/stats.inc.php
diff options
context:
space:
mode:
authorcanyonknight <canyonknight@gmail.com>2012-09-23 21:12:01 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2012-09-24 02:04:03 +0200
commit964ea083e68310ca7c09ca938219f4146f0ca5b9 (patch)
treef057ddc62445f0b96a01effb656a269dada448a3 /web/lib/stats.inc.php
parent6fa2f99e71c35bdd9dcc40a6973da9ea5d529ad2 (diff)
downloadaur-964ea083e68310ca7c09ca938219f4146f0ca5b9.tar.gz
aur-964ea083e68310ca7c09ca938219f4146f0ca5b9.tar.xz
stats.inc.php: Document all functions using PHPDoc format
Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib/stats.inc.php')
-rw-r--r--web/lib/stats.inc.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/web/lib/stats.inc.php b/web/lib/stats.inc.php
index 2c26d43e..60973e90 100644
--- a/web/lib/stats.inc.php
+++ b/web/lib/stats.inc.php
@@ -2,6 +2,13 @@
include_once('aur.inc.php');
+/**
+ * Display the most recent 10 packages
+ *
+ * @param \PDO $dbh An already established database connection
+ *
+ * @return void
+ */
function updates_table($dbh) {
$key = 'recent_updates';
if(!($newest_packages = get_cache_value($key))) {
@@ -17,6 +24,14 @@ function updates_table($dbh) {
include('stats/updates_table.php');
}
+/**
+ * Display a user's statistics table
+ *
+ * @param string $userid The user ID of the person to get package statistics for
+ * @param \PDO $dbh An already established database connection
+ *
+ * @return void
+ */
function user_table($userid, $dbh) {
$base_q = "SELECT count(*) FROM Packages WHERE Packages.MaintainerUID = " . $userid;
@@ -34,6 +49,13 @@ function user_table($userid, $dbh) {
include('stats/user_table.php');
}
+/**
+ * Display the general package statistics table
+ *
+ * @param \PDO $dbh An already established database connection
+ *
+ * @return void
+ */
function general_stats_table($dbh) {
# AUR statistics
$q = "SELECT count(*) FROM Packages";