From 3d952f41c8d90b5c217616fb060697f93fb9db07 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 8 Nov 2010 22:16:57 -0800 Subject: 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. --- modules/tag/helpers/tag.php | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/tag/helpers') 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); } /** -- cgit v1.2.3