check for permissions

This commit is contained in:
Daku
2014-02-03 15:35:42 +00:00
parent 629f9940c3
commit 6e54580f56
4 changed files with 26 additions and 19 deletions

View File

@ -262,7 +262,9 @@ class NumericScore extends Extension {
if(preg_match("/^vote[=|:](up|down|remove)$/", $event->term, $matches)) {
global $user;
$score = ($matches[1] == "up" ? 1 : ($matches[1] == "down" ? -1 : 0));
send_event(new NumericScoreSetEvent($event->id, $user, $score));
if(!$user->is_anonymous()) {
send_event(new NumericScoreSetEvent($event->id, $user, $score));
}
}
if(!empty($matches)) $event->metatag = true;