diff --git a/ext/auto_tagger/main.php b/ext/auto_tagger/main.php index 88f930510..8913c6117 100644 --- a/ext/auto_tagger/main.php +++ b/ext/auto_tagger/main.php @@ -151,20 +151,20 @@ public function onDatabaseUpgrade(DatabaseUpgradeEvent $event): void public function onTagSet(TagSetEvent $event): void { error_log("auto-tagger: tag set!"); - foreach($nt in $event->new_tags) { + foreach($event->new_tags as $nt) { error_log("new tag: ".$nt); } - foreach($ot in $event->old_tags) { + foreach($event->new_tags as $ot) { error_log("old tag: ".$ot); } - foreach($mt in $event->metatags) { + foreach($event->new_tags as $mt) { error_log("meta tag: ".$mt); } $results = $this->apply_auto_tags($event->new_tags); if (!empty($results)) { $event->new_tags = $results; error_log("auto-tagger: results"); - foreach($r in $results) { + foreach($results as $r) { error_log($r); } }