forked from Cavemanon/cavepaintings
One True Image Info Editor
git-svn-id: file:///home/shish/svn/shimmie2/trunk@616 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
@ -51,14 +51,15 @@ class NumericScore extends Extension {
|
||||
}
|
||||
}
|
||||
|
||||
if(is_a($event, 'DisplayingImageEvent')) {
|
||||
if(is_a($event, 'ImageInfoBoxBuildingEvent')) {
|
||||
global $user;
|
||||
global $config;
|
||||
if(!$user->is_anonymous() || $config->get_bool("numeric_score_anon")) {
|
||||
$this->theme->display_voter($event->page, $event->image->id, $event->image->numeric_score);
|
||||
$event->add_part($this->theme->get_voter_html($event->image));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(is_a($event, 'ImageDeletionEvent')) {
|
||||
global $database;
|
||||
$database->execute("DELETE FROM numeric_score_votes WHERE image_id=?", array($event->image->id));
|
||||
|
Reference in New Issue
Block a user