summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/tag/helpers/tag.php4
1 files changed, 0 insertions, 4 deletions
diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php
index e1cb9ec6..b1505b3d 100644
--- a/modules/tag/helpers/tag.php
+++ b/modules/tag/helpers/tag.php
@@ -33,14 +33,10 @@ class tag_Core {
if (!$tag->loaded) {
$tag->name = $tag_name;
$tag->count = 0;
- // Need to save it now to get an id assigned.
$tag->save();
}
if (!$tag->has($item)) {
- // Note: ORM::has() causes a database lookup. ORM::add() calls ORM::has() a second time,
- // so we're doing an extra database lookup just to make sure that we don't increment the
- // count value if the tag already existed.
if (!$tag->add($item, $tag)) {
throw new Exception("@todo {$tag->name} WAS_NOT_ADDED_TO {$item->id}");
}