summaryrefslogtreecommitdiff
path: root/modules/tag/controllers
diff options
context:
space:
mode:
authorAndy Lindeman <andy@highgroove.com>2011-04-23 12:04:12 -0400
committerAndy Lindeman <andy@highgroove.com>2011-04-23 12:04:43 -0400
commitc101151616033d53587d1435881dae0fa45aeefa (patch)
treec848494ad67ed0c10cfdf6b7f7f5d00b92717d40 /modules/tag/controllers
parent563a25f559a0247b2e3f4e96b191e7138c8e8ea5 (diff)
Allow tags to be merged by renaming
* Fixes #1628
Diffstat (limited to 'modules/tag/controllers')
-rw-r--r--modules/tag/controllers/admin_tags.php11
1 files changed, 1 insertions, 10 deletions
diff --git a/modules/tag/controllers/admin_tags.php b/modules/tag/controllers/admin_tags.php
index 73042a55..fd82bc92 100644
--- a/modules/tag/controllers/admin_tags.php
+++ b/modules/tag/controllers/admin_tags.php
@@ -81,9 +81,7 @@ class Admin_Tags_Controller extends Admin_Controller {
$in_place_edit = InPlaceEdit::factory($tag->name)
->action("admin/tags/rename/$tag->id")
- ->rules(array("required", "length[1,64]"))
- ->messages(array("in_use" => t("There is already a tag with that name")))
- ->callback(array($this, "check_for_duplicate"));
+ ->rules(array("required", "length[1,64]"));
if ($in_place_edit->validate()) {
$old_name = $tag->name;
@@ -101,12 +99,5 @@ class Admin_Tags_Controller extends Admin_Controller {
}
}
- public function check_for_duplicate(Validation $post_data, $field) {
- $tag_exists = ORM::factory("tag")->where("name", "=", $post_data[$field])->count_all();
- if ($tag_exists) {
- $post_data->add_error($field, "in_use");
- }
- }
-
}