From 74e307b55fcaf25259d3b606b70e798b1a2e7284 Mon Sep 17 00:00:00 2001 From: Daku Date: Sun, 26 Feb 2012 15:13:07 +0000 Subject: [PATCH] update tags if image already exists --- ext/image/main.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/image/main.php b/ext/image/main.php index 15b08f87..6db78525 100644 --- a/ext/image/main.php +++ b/ext/image/main.php @@ -307,6 +307,8 @@ class ImageIO extends Extension { 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);