rating event rather than database access

This commit is contained in:
Shish 2011-12-25 14:35:55 +00:00
parent d25ef4e6f6
commit 3e6d5cec6f

View file

@ -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.