diff --git a/ext/image/main.php b/ext/image/main.php index 6db78525..4b306ab6 100644 --- a/ext/image/main.php +++ b/ext/image/main.php @@ -301,14 +301,12 @@ class ImageIO extends Extension { $existing = Image::by_hash($image->hash); if(!is_null($existing)) { $handler = $config->get_string("upload_collision_handler"); - if($handler == "merge") { + if($handler == "merge" || isset($_GET['update'])) { $merged = array_merge($image->get_tag_array(), $existing->get_tag_array()); send_event(new TagSetEvent($existing, $merged)); return null; } else { - $merged = array_merge($image->get_tag_array(), $existing->get_tag_array()); //TODO: Make this only work if &update=1 is set - send_event(new TagSetEvent($existing, $merged)); //Update tags even if image exists $error = "Image {$existing->id} ". "already has hash {$image->hash}:
".Themelet::build_thumb_html($existing); throw new ImageAdditionException($error);