diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2011-04-23 13:16:27 -0700 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2011-04-23 13:16:27 -0700 |
| commit | b57b229543aeab096e8574e9f27cff5d6a9ed07c (patch) | |
| tree | a9e9595ef6f3a88b3c33e94068191cc148b7160b /modules/tag/controllers | |
| parent | c1779a9e8f1a2c3cbda576815a37fd9b67b3c82c (diff) | |
| parent | c101151616033d53587d1435881dae0fa45aeefa (diff) | |
Merge branch 'alindeman/1628' of git://github.com/alindeman/gallery3 into andy
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"); - } - } - } |
