summaryrefslogtreecommitdiffstats
path: root/pages
diff options
context:
space:
mode:
Diffstat (limited to 'pages')
-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>";
}