stable too
git-svn-id: file:///home/shish/svn/shimmie2/branches/branch_2.1@691 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
96fb17b5f1
commit
902cfcad25
@ -94,6 +94,11 @@ class TagEdit extends Extension {
|
|||||||
// FIXME: what if the (image_id,tag_id) pair already exists?
|
// FIXME: what if the (image_id,tag_id) pair already exists?
|
||||||
$database->Execute("UPDATE IGNORE image_tags SET tag_id=? WHERE tag_id=?", Array($replace_id, $search_id));
|
$database->Execute("UPDATE IGNORE image_tags SET tag_id=? WHERE tag_id=?", Array($replace_id, $search_id));
|
||||||
$database->Execute("DELETE FROM image_tags WHERE tag_id=?", Array($search_id));
|
$database->Execute("DELETE FROM image_tags WHERE tag_id=?", Array($search_id));
|
||||||
|
$database->Execute("
|
||||||
|
UPDATE tags
|
||||||
|
SET count=(SELECT COUNT(image_id) FROM image_tags WHERE tag_id=tags.id GROUP BY tag_id)
|
||||||
|
WHERE id=?
|
||||||
|
", array($replace_id));
|
||||||
}
|
}
|
||||||
else if($search_id) {
|
else if($search_id) {
|
||||||
$database->Execute("UPDATE tags SET tag=? WHERE tag=?", Array($replace, $search));
|
$database->Execute("UPDATE tags SET tag=? WHERE tag=?", Array($replace, $search));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user