From e6c032316a83a55bf81010ff61b10f509ee452fd Mon Sep 17 00:00:00 2001 From: slothman Date: Fri, 15 Feb 2008 17:54:56 +0000 Subject: [PATCH] Fixes to match 1.3 word-rating change --- .../serendipity_event_karma/serendipity_event_karma.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugins/serendipity_event_karma/serendipity_event_karma.php b/plugins/serendipity_event_karma/serendipity_event_karma.php index 03116e7..01ed261 100644 --- a/plugins/serendipity_event_karma/serendipity_event_karma.php +++ b/plugins/serendipity_event_karma/serendipity_event_karma.php @@ -1574,14 +1574,13 @@ END_IMG_CSS; $rating = ((float)$points) / ((float)$votes); // Put it into the language-specific string format, rounding up // I'm mapping invalid cases (rating > 5 and rating < -2) to the extremes - $rating = (int)($rating + 0.5); - if ($rating <= -2) { + if ($rating <= -1.5) { $rating = PLUGIN_KARMA_VOTEPOINT_1; - } elseif ($rating <= -1) { + } elseif ($rating <= -0.5) { $rating = PLUGIN_KARMA_VOTEPOINT_2; - } elseif ($rating <= 0) { + } elseif ($rating <= 0.5) { $rating = PLUGIN_KARMA_VOTEPOINT_3; - } elseif ($rating <= 1) { + } elseif ($rating <= 1.5) { $rating = PLUGIN_KARMA_VOTEPOINT_4; } else { $rating = PLUGIN_KARMA_VOTEPOINT_5; -- 2.39.5