rating event rather than database access
This commit is contained in:
parent
d25ef4e6f6
commit
3e6d5cec6f
1 changed files with 2 additions and 2 deletions
|
@ -180,9 +180,9 @@ abstract class DataHandlerExtension implements Extension {
|
||||||
|
|
||||||
// Rating Stuff.
|
// Rating Stuff.
|
||||||
if(!empty($event->metadata['rating'])){
|
if(!empty($event->metadata['rating'])){
|
||||||
global $database;
|
global $user;
|
||||||
$rating = $event->metadata['rating'];
|
$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.
|
// Locked Stuff.
|
||||||
|
|
Reference in a new issue