move metatag parsing to after set_tags is sent, rather than before

This commit is contained in:
Daku
2015-10-08 18:58:52 +01:00
parent b11041898b
commit 43d0a297b8
4 changed files with 27 additions and 12 deletions

View File

@ -258,7 +258,7 @@ class NumericScore extends Extension {
public function onTagTermParse(TagTermParseEvent $event) {
$matches = array();
if(preg_match("/^vote[=|:](up|down|remove)$/", $event->term, $matches)) {
if(preg_match("/^vote[=|:](up|down|remove)$/", $event->term, $matches) && $event->parse) {
global $user;
$score = ($matches[1] == "up" ? 1 : ($matches[1] == "down" ? -1 : 0));
if(!$user->is_anonymous()) {