X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fstats.php;h=d931031d3091081abf0e26b0d8134545a5b77922;hb=53595c2a9d1df6993dd69217c4bd1a6a9d51bff7;hp=24863ae7e2874c91f9047e64bb1e617de97d4e2f;hpb=93d42b4fcc6f055a428c9b63e386ac62c918d08a;p=platal.git diff --git a/modules/stats.php b/modules/stats.php index 24863ae..d931031 100644 --- a/modules/stats.php +++ b/modules/stats.php @@ -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);