diff options
Diffstat (limited to 'modules/gallery/models')
-rw-r--r-- | modules/gallery/models/item.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index 7bcf1f31..07f781d1 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -498,7 +498,7 @@ class Item_Model_Core extends ORM_MPTT { $base_slug = $this->slug; while (ORM::factory("item") ->where("parent_id", "=", $this->parent_id) - ->where("id", "<>", $this->id) + ->where("id", $this->id ? "<>" : "IS NOT", $this->id) ->and_open() ->where("name", "=", $this->name) ->or_where("slug", "=", $this->slug) |