From 3e6d5cec6f4a4216f06be87428434398315a277f Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 25 Dec 2011 14:35:55 +0000 Subject: [PATCH] rating event rather than database access --- core/extension.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/extension.class.php b/core/extension.class.php index 4571b1c0..d9cd0a18 100644 --- a/core/extension.class.php +++ b/core/extension.class.php @@ -180,9 +180,9 @@ abstract class DataHandlerExtension implements Extension { // Rating Stuff. if(!empty($event->metadata['rating'])){ - global $database; + global $user; $rating = $event->metadata['rating']; - $database->Execute("UPDATE images SET rating=? WHERE id=?", array($rating, $event->image_id)); + send_event(new RatingSetEvent($image, $user, $rating)); } // Locked Stuff.