From: slothman <slothman>
Date: Fri, 15 Feb 2008 17:54:56 +0000 (+0000)
Subject: Fixes to match 1.3 word-rating change
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e6c032316a83a55bf81010ff61b10f509ee452fd;p=s9y.git

Fixes to match 1.3 word-rating change
---

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;