summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBlueRaja <BlueRaja.admin@gmail.com>2013-01-13 16:14:51 -0600
committerBlueRaja <BlueRaja.admin@gmail.com>2013-01-13 16:14:51 -0600
commit35307251560e459615f2a3e5ab6572b3f80cfdd9 (patch)
treeaba2449c977de905884802ea046f88cb9c04329b
parent994998fcca96e69bfbd7eed09e3c0023aadc2ce1 (diff)
downloadpathery-35307251560e459615f2a3e5ab6572b3f80cfdd9.tar.xz
Fixed champion points not showing up correctly in leaderboards weekly/monthly view
-rw-r--r--pages/leaderboard.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/pages/leaderboard.php b/pages/leaderboard.php
index 1c6ef89..b5e3a76 100644
--- a/pages/leaderboard.php
+++ b/pages/leaderboard.php
@@ -110,7 +110,9 @@ function getStat ($type, $daysAgo = 1) {
userData.wallEmblem,
userData.displayColor,
users.ID as userID,
- solutions.championPointsWorth
+ SUM(CASE WHEN solutions.dateModified < CURDATE()
+ THEN solutions.championPointsWorth
+ ELSE 0 END) AS championPointsWorth
FROM `maps`
JOIN `solutions`
ON maps.ID = solutions.mapID
@@ -305,7 +307,7 @@ function displaystats($result, $caption = NULL) {
}
$r = '';
- if($championPoints != null)
+ if($championPoints != null && $championPoints > 0)
{
$r .= "<div class='myPoints'>Points earned: <span class='myPointsValue'>$championPoints</span> <img src='../images/championpoints.png' width='16px' height='16px'></img></div>";
}