From b28c77b32d841b17846952674181f69b543e7d9f Mon Sep 17 00:00:00 2001 From: shish Date: Tue, 8 Apr 2008 16:58:04 +0000 Subject: [PATCH] bug fix git-svn-id: file:///home/shish/svn/shimmie2/trunk@785 7f39781d-f577-437e-ae19-be835c7a54ca --- contrib/numeric_score/main.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/numeric_score/main.php b/contrib/numeric_score/main.php index dee4cab3..ce227028 100644 --- a/contrib/numeric_score/main.php +++ b/contrib/numeric_score/main.php @@ -41,9 +41,10 @@ class NumericScore extends Extension { if(is_a($event, 'ImageInfoSetEvent')) { global $user; $char = $_POST['numeric_score']; + $score = 0; if($char == "u") $score = 1; else if($char == "d") $score = -1; - send_event(new NumericScoreSetEvent($event->image_id, $user, $score)); + if($score != 0) send_event(new NumericScoreSetEvent($event->image_id, $user, $score)); } if(is_a($event, 'NumericScoreSetEvent')) {