From c1c50846451dacd20c3569c7cb99964a0c890026 Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 3 Jul 2023 10:49:38 +0100 Subject: [PATCH] use Tag/SourceSetEvent for mass editing, to ensure the standard rules are followed --- ext/tag_edit/main.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ext/tag_edit/main.php b/ext/tag_edit/main.php index 4e85c319b..dc510a20a 100644 --- a/ext/tag_edit/main.php +++ b/ext/tag_edit/main.php @@ -337,8 +337,7 @@ private function mass_tag_edit(string $search, string $replace, bool $commit) foreach ($images as $image) { $before = array_map('strtolower', $image->get_tag_array()); $after = array_merge(array_diff($before, $search_set), $replace_set); - $image->set_tags($after); - + send_event(new TagSetEvent($image, $after)); $last_id = $image->id; } if ($commit) { @@ -371,7 +370,7 @@ private function mass_source_edit(string $tags, string $source) } foreach ($images as $image) { - $image->set_source($source); + send_event(new SourceSetEvent($image, $source)); $last_id = $image->id; } }