summaryrefslogtreecommitdiff
path: root/modules/tag/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-01-23 16:23:50 -0800
committerBharat Mediratta <bharat@menalto.com>2010-01-23 16:23:50 -0800
commit8849594aa17768f564e45370a62f01e440570dcf (patch)
treed457337d7699e3d0683a1b2af40b7615a52da1cc /modules/tag/helpers
parentd4308e4d35a585a1ce17e4340894e520268260b7 (diff)
parenta4519c6dce542c533d370c790074e6cc5e81170b (diff)
Merge branch 'bharat_dev' of git@github.com:/gallery/gallery3 into bharat_dev
Diffstat (limited to 'modules/tag/helpers')
-rw-r--r--modules/tag/helpers/tag.php12
1 files changed, 3 insertions, 9 deletions
diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php
index 9e59b527..a500be58 100644
--- a/modules/tag/helpers/tag.php
+++ b/modules/tag/helpers/tag.php
@@ -37,17 +37,11 @@ class tag_Core {
if (!$tag->loaded()) {
$tag->name = $tag_name;
$tag->count = 0;
- $tag->save();
}
- if (!$tag->has($item)) {
- if (!$tag->add($item)) {
- throw new Exception("@todo {$tag->name} WAS_NOT_ADDED_TO {$item->id}");
- }
- $tag->count++;
- $tag->save();
- }
- return $tag;
+ $tag->add($item);
+ $tag->count++;
+ return $tag->save();
}
/**