summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/album.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-11-26 12:09:04 -0800
committerBharat Mediratta <bharat@menalto.com>2009-11-26 12:09:04 -0800
commit1fd0e14359a7c7164573e4aa897c07680339e713 (patch)
tree62b01b88571e53810aa7f3efc2f0f01e727904e2 /modules/gallery/helpers/album.php
parent22823df22098ed1a69d88c2e5fdc30cd90f72c30 (diff)
Convert all DB where() calls to take 3 arguments.
Convert all open_paren() calls to and_open() or or_open() as appropriate.
Diffstat (limited to 'modules/gallery/helpers/album.php')
-rw-r--r--modules/gallery/helpers/album.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/gallery/helpers/album.php b/modules/gallery/helpers/album.php
index 84a60f83..cd8777e2 100644
--- a/modules/gallery/helpers/album.php
+++ b/modules/gallery/helpers/album.php
@@ -68,11 +68,11 @@ class album_Core {
// Randomize the name or slug if there's a conflict
// @todo Improve this. Random numbers are not user friendly
while (ORM::factory("item")
- ->where("parent_id", $parent->id)
- ->open_paren()
- ->where("name", $album->name)
- ->orwhere("slug", $album->slug)
- ->close_paren()
+ ->where("parent_id", "=", $parent->id)
+ ->and_open()
+ ->where("name", "=", $album->name)
+ ->orwhere("slug", "=", $album->slug)
+ ->close()
->find()->id) {
$rand = rand();
$album->name = "{$name}-$rand";