summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/item.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/helpers/item.php')
-rw-r--r--modules/gallery/helpers/item.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/gallery/helpers/item.php b/modules/gallery/helpers/item.php
index c620ba95..fc390e70 100644
--- a/modules/gallery/helpers/item.php
+++ b/modules/gallery/helpers/item.php
@@ -122,11 +122,11 @@ class item_Core {
if ($row = db::build()
->select(array("name", "slug"))
->from("items")
- ->where("parent_id", $item->parent_id)
- ->where("id <>", $item->id)
+ ->where("parent_id", "=", $item->parent_id)
+ ->where("id", "<>", $item->id)
->and_open()
- ->where("name", $new_name)
- ->orwhere("slug", $new_slug)
+ ->where("name", "=", $new_name)
+ ->or_where("slug", "=", $new_slug)
->close()
->execute()
->current()) {