From cb01f4017d70a7d73273052b424e8b78b794bc1c Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 11 Jun 2010 16:37:45 -0700 Subject: Fix for ticket #1118. The item validation was flagging duplicate slugs as errors. There was already code in the item save to insure that any duplicates were made unique, so this patch removes the validation as unnecessary. --- modules/gallery/models/item.php | 7 ------- 1 file changed, 7 deletions(-) (limited to 'modules') diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index 009457c1..a4f264bb 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -767,13 +767,6 @@ class Item_Model extends ORM_MPTT { public function valid_slug(Validation $v, $field) { if (preg_match("/[^A-Za-z0-9-_]/", $this->slug)) { $v->add_error("slug", "not_url_safe"); - } else if (db::build() - ->from("items") - ->where("parent_id", "=", $this->parent_id) - ->where("id", "<>", $this->id) - ->where("slug", "=", $this->slug) - ->count_records()) { - $v->add_error("slug", "conflict"); } } -- cgit v1.2.3