diff --git a/ext/mass_tagger/main.php b/ext/mass_tagger/main.php index 7170dae8..6b7a8132 100644 --- a/ext/mass_tagger/main.php +++ b/ext/mass_tagger/main.php @@ -1,7 +1,7 @@ + * Author: Christian Walde , contributions by Shish and Agasa * License: WTFPL * Description: Tag a bunch of images at once * Documentation: @@ -38,8 +38,18 @@ class MassTagger extends Extension { $images = array_map( "Image::by_id", $ids ); - foreach($images as $image) { - $image->set_tags($tag . " " . $image->get_tag_list()); + if(isset($_POST['setadd']) && + $_POST['setadd'] == 'set') + { + foreach($images as $image) { + $image->set_tags($tag); + } + } + else + { + foreach($images as $image) { + $image->set_tags($tag . " " . $image->get_tag_list()); + } } $page->set_mode("redirect"); diff --git a/ext/mass_tagger/theme.php b/ext/mass_tagger/theme.php index 0f0b009e..5a844bac 100644 --- a/ext/mass_tagger/theme.php +++ b/ext/mass_tagger/theme.php @@ -13,6 +13,7 @@ class MassTaggerTheme extends Themelet { Click on images to mark them. Use the 'Index Options' in the Board Config to increase the amount of shown images.
+ Set instead of add?