diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-11-26 12:09:04 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-11-26 12:09:04 -0800 |
commit | 1fd0e14359a7c7164573e4aa897c07680339e713 (patch) | |
tree | 62b01b88571e53810aa7f3efc2f0f01e727904e2 /modules/gallery/controllers/photos.php | |
parent | 22823df22098ed1a69d88c2e5fdc30cd90f72c30 (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/controllers/photos.php')
-rw-r--r-- | modules/gallery/controllers/photos.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/gallery/controllers/photos.php b/modules/gallery/controllers/photos.php index f052eccd..0d7daac4 100644 --- a/modules/gallery/controllers/photos.php +++ b/modules/gallery/controllers/photos.php @@ -74,12 +74,12 @@ class Photos_Controller extends Items_Controller { if ($row = Database::instance() ->select(array("name", "slug")) ->from("items") - ->where("parent_id", $photo->parent_id) - ->where("id <>", $photo->id) - ->open_paren() - ->where("name", $form->edit_item->filename->value) - ->orwhere("slug", $form->edit_item->slug->value) - ->close_paren() + ->where("parent_id", "=", $photo->parent_id) + ->where("id", "<>", $photo->id) + ->and_open() + ->where("name", "=", $form->edit_item->filename->value) + ->orwhere("slug", "=", $form->edit_item->slug->value) + ->close() ->get() ->current()) { if ($row->name == $form->edit_item->filename->value) { |