summaryrefslogtreecommitdiff
path: root/modules/tag/controllers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-11-08 22:16:57 -0800
committerBharat Mediratta <bharat@menalto.com>2010-11-08 22:16:57 -0800
commit3d952f41c8d90b5c217616fb060697f93fb9db07 (patch)
tree8fafc6d09476240a7cbf57dcea87de4219c719fd /modules/tag/controllers
parentdae835449115b322c0ad057230a34a78d530b9a4 (diff)
Fix a bug in the way that we add tags that causes it to be really slow
when adding a tag to lots of items. Tag_Model::save() would call item_related_update for every tag related to an item upon save which is an O(N!) operation. Fixes ticket #1412.
Diffstat (limited to 'modules/tag/controllers')
-rw-r--r--modules/tag/controllers/admin_tags.php1
1 files changed, 0 insertions, 1 deletions
diff --git a/modules/tag/controllers/admin_tags.php b/modules/tag/controllers/admin_tags.php
index 0c82579b..99743a8e 100644
--- a/modules/tag/controllers/admin_tags.php
+++ b/modules/tag/controllers/admin_tags.php
@@ -52,7 +52,6 @@ class Admin_Tags_Controller extends Admin_Controller {
$form = tag::get_delete_form($tag);
if ($form->validate()) {
$name = $tag->name;
- db::build()->delete("items_tags")->where("tag_id", "=", $tag->id)->execute();
$tag->delete();
message::success(t("Deleted tag %tag_name", array("tag_name" => $name)));
log::success("tags", t("Deleted tag %tag_name", array("tag_name" => $name)));