X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fstats.php;h=376f2bacb24306cf73232841dba563d87ba638c0;hb=f3bfd6c9a14b70736b9416a1892d7548e160880b;hp=24863ae7e2874c91f9047e64bb1e617de97d4e2f;hpb=00ca0ad5370df5be4a0272364fb16a4385ffabfe;p=platal.git diff --git a/modules/stats.php b/modules/stats.php index 24863ae..376f2ba 100644 --- a/modules/stats.php +++ b/modules/stats.php @@ -1,6 +1,6 @@ changeTpl('stats/index.tpl'); } - function handler_evolution(&$page, $jours = 365) + function handler_evolution($page, $jours = 365) { $page->changeTpl('stats/evolution_inscrits.tpl'); $page->assign('jours', $jours); } - function handler_graph_evo(&$page, $jours = 365) + function handler_graph_evo($page, $jours = 365) { define('DUREEJOUR', 24 * 3600); @@ -65,9 +65,9 @@ class StatsModule extends PLModule $res = XDB::iterRow('SELECT IF(registration_date > DATE_SUB(NOW(), INTERVAL {?} DAY), TO_DAYS(registration_date) - TO_DAYS(NOW()), -{?}) AS jour, - COUNT(uid) AS nb + COUNT(a.uid) AS nb FROM accounts AS a - LEFT JOIN account_profiles AS ap ON(ap.uid = a.uid AND FIND_IN_SET(\'owner\', ap.flags)) + LEFT JOIN account_profiles AS ap ON (ap.uid = a.uid AND FIND_IN_SET(\'owner\', ap.perms)) LEFT JOIN profiles AS p ON (ap.pid = p.pid) WHERE state = \'active\' AND p.deathdate IS NULL GROUP BY jour', (int)$jours, 1 + (int)$jours); @@ -121,7 +121,7 @@ EOF2; exit; } - function handler_graph(&$page, $promo = null) + function handler_graph($page, $promo = null) { if ($promo == 'all') { // date de départ @@ -246,7 +246,7 @@ EOF2; exit; } - function handler_promos(&$page, $promo = null) + function handler_promos($page, $promo = null) { $page->changeTpl('stats/nb_by_promo.tpl'); @@ -273,7 +273,7 @@ EOF2; $page->assign('promo', $promo); } - function handler_coupures(&$page, $cp_id = null) + function handler_coupures($page, $cp_id = null) { $page->changeTpl('stats/coupure.tpl');