From 35307251560e459615f2a3e5ab6572b3f80cfdd9 Mon Sep 17 00:00:00 2001 From: BlueRaja Date: Sun, 13 Jan 2013 16:14:51 -0600 Subject: Fixed champion points not showing up correctly in leaderboards weekly/monthly view --- pages/leaderboard.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pages') 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 .= "
Points earned: $championPoints
"; } -- cgit v1.2.3