summaryrefslogtreecommitdiff
path: root/modules/tag/helpers
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/helpers
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/helpers')
-rw-r--r--modules/tag/helpers/tag.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php
index 14d27c94..79e74385 100644
--- a/modules/tag/helpers/tag.php
+++ b/modules/tag/helpers/tag.php
@@ -126,6 +126,7 @@ class tag_Core {
->delete("items_tags")
->where("item_id", "=", $item->id)
->execute();
+ module::event("item_related_update", $item);
}
/**