update tags if image already exists
This commit is contained in:
parent
8e4ae87c65
commit
74e307b55f
@ -307,6 +307,8 @@ class ImageIO extends Extension {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else {
|
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 <a href='".make_link("post/view/{$existing->id}")."'>{$existing->id}</a> ".
|
$error = "Image <a href='".make_link("post/view/{$existing->id}")."'>{$existing->id}</a> ".
|
||||||
"already has hash {$image->hash}:<p>".Themelet::build_thumb_html($existing);
|
"already has hash {$image->hash}:<p>".Themelet::build_thumb_html($existing);
|
||||||
throw new ImageAdditionException($error);
|
throw new ImageAdditionException($error);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user