summaryrefslogtreecommitdiffstats
path: root/pages/memberlist.php
diff options
context:
space:
mode:
authorBlueRaja <BlueRaja.admin@gmail.com>2012-08-17 20:03:51 -0500
committerBlueRaja <BlueRaja.admin@gmail.com>2012-08-17 20:03:51 -0500
commit02f4ef27a6fbe478588cedae28f9d9001756ab38 (patch)
treea679c8653e95c3b1fa60ec50ccfd7587d4582e87 /pages/memberlist.php
parente33b5d091f125b8b757f4fce6520324882f8010d (diff)
downloadpathery-02f4ef27a6fbe478588cedae28f9d9001756ab38.tar.xz
Ignore the move-count from today - Memberslist Page
In order to not show "0 moves" for an entire day, "This Week" now shows scores from the past 7 days rather than the current week. They can still view "this week's" scores on the scoreboard page - not sure if we'd want to change that for consistency or not.
Diffstat (limited to 'pages/memberlist.php')
-rw-r--r--pages/memberlist.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/pages/memberlist.php b/pages/memberlist.php
index 191bfa5..a682579 100644
--- a/pages/memberlist.php
+++ b/pages/memberlist.php
@@ -58,7 +58,7 @@ $sql = "SELECT
(SELECT SUM(moves) FROM solutions WHERE solutions.userID = users.ID) AS totalMoves,
(SELECT SUM(moves) FROM solutions
WHERE solutions.userID = users.ID AND
- YEARweek(solutions.dateModified) = YEARweek(CURRENT_DATE)) AS totalMovesThisWeek,
+ solutions.dateModified BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 7 DAY) AND CURRENT_DATE) AS totalMovesThisWeek,
(SELECT COUNT(*) FROM solutions WHERE solutions.userID = users.ID) AS totalMazes,
SUM(CASE WHEN statistics.type IN (32, 33, 34, 35) THEN statistics.value ELSE 0 END) as totalWins,
SUM(CASE WHEN statistics.type IN (1, 2, 3, 4) THEN statistics.value ELSE 0 END) as totalTies,
@@ -88,7 +88,7 @@ $cat['Moves']['c'] = 'totalMoves';
$cat['Moves']['title'] = 'Total Moves Mazed';
$cat['This Week']['c'] = 'totalMovesThisWeek';
-$cat['This Week']['title'] = 'Total Moves Mazed This Week (Starting Monday)';
+$cat['This Week']['title'] = 'Total Moves In Past 7 Days (Excluding Today)';
$cat['Wins']['c'] = 'totalWins';
$cat['Wins']['title'] = 'Total Wins (Champion)';