Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
Giraffaman committed Mar 23, 2024
1 parent 08aa32a commit fa5782e
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions ext/auto_tagger/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,9 @@ public function onTagSet(TagSetEvent $event): void
}
error_log("auto-tagger: checking results for metatags...");
# need to check tags again for metatags
$tmp_new_tags = [];
$tmp_metatags = [];
foreach ($results as $r) {
if ((!str_contains($r, ':')) && (!str_contains($r, '='))) {
$tmp_new_tags[] = $r;
$event->new_tags[] = $r;
error_log("auto-tagger: ".$r." is definitely a normal tag.");
continue;
}
Expand All @@ -184,15 +182,13 @@ public function onTagSet(TagSetEvent $event): void

//seperate tags from metatags
if (!$ttpe->metatag) {
$tmp_new_tags[] = $r;
$event->new_tags[] = $r;
error_log("auto-tagger: ".$r." is a normal tag.");
} else {
error_log("auto-tagger: ".$r." is a meta tag!");
$tmp_metatags[] = $r;
$event->metatags[] = $r;
}
}
$event->new_tags = $tmp_new_tags;
$event->metatags = $tmp_metatags;
}
}

Expand Down

0 comments on commit fa5782e

Please sign in to comment.