diff options
Diffstat (limited to 'modules/tag/controllers')
| -rw-r--r-- | modules/tag/controllers/admin_tags.php | 11 |
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"); - } - } - } |
