From dee3ee81e2013f0b38e0f84123dec2ce12574bd7 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 26 Nov 2009 20:25:32 -0800 Subject: Database::orwhere() is now Database_Builder::or_where() --- modules/exif/helpers/exif.php | 2 +- modules/exif/helpers/exif_task.php | 2 +- modules/gallery/controllers/albums.php | 2 +- modules/gallery/controllers/movies.php | 2 +- modules/gallery/controllers/photos.php | 2 +- modules/gallery/helpers/album.php | 2 +- modules/gallery/helpers/movie.php | 2 +- modules/gallery/helpers/photo.php | 2 +- modules/gallery/tests/Database_Test.php | 8 ++++---- modules/search/helpers/search.php | 2 +- modules/search/helpers/search_task.php | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/exif/helpers/exif.php b/modules/exif/helpers/exif.php index b4241e89..a8b12a8b 100644 --- a/modules/exif/helpers/exif.php +++ b/modules/exif/helpers/exif.php @@ -146,7 +146,7 @@ class exif_Core { ->where("type", "=", "photo") ->and_open() ->where("exif_records.item_id", "=", null) - ->orwhere("exif_records.dirty", "=", 1) + ->or_where("exif_records.dirty", "=", 1) ->close() ->get() ->count(); diff --git a/modules/exif/helpers/exif_task.php b/modules/exif/helpers/exif_task.php index 1a449fc7..66f69790 100644 --- a/modules/exif/helpers/exif_task.php +++ b/modules/exif/helpers/exif_task.php @@ -47,7 +47,7 @@ class exif_task_Core { ->where("type", "=", "photo") ->and_open() ->where("exif_records.item_id", "=", null) - ->orwhere("exif_records.dirty", "=", 1) + ->or_where("exif_records.dirty", "=", 1) ->close() ->find_all() as $item) { // The query above can take a long time, so start the timer after its done diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php index 431d98a0..32db48d4 100644 --- a/modules/gallery/controllers/albums.php +++ b/modules/gallery/controllers/albums.php @@ -130,7 +130,7 @@ class Albums_Controller extends Items_Controller { ->where("id", "<>", $album->id) ->and_open() ->where("name", "=", $form->edit_item->dirname->value) - ->orwhere("slug", "=", $form->edit_item->slug->value) + ->or_where("slug", "=", $form->edit_item->slug->value) ->close() ->get() ->current()) { diff --git a/modules/gallery/controllers/movies.php b/modules/gallery/controllers/movies.php index 157c388f..e017b8c8 100644 --- a/modules/gallery/controllers/movies.php +++ b/modules/gallery/controllers/movies.php @@ -78,7 +78,7 @@ class Movies_Controller extends Items_Controller { ->where("id <>", $movie->id) ->and_open() ->where("name", "=", $form->edit_item->filename->value) - ->orwhere("slug", "=", $form->edit_item->slug->value) + ->or_where("slug", "=", $form->edit_item->slug->value) ->close() ->get() ->current()) { diff --git a/modules/gallery/controllers/photos.php b/modules/gallery/controllers/photos.php index 478447b1..5431fcfe 100644 --- a/modules/gallery/controllers/photos.php +++ b/modules/gallery/controllers/photos.php @@ -78,7 +78,7 @@ class Photos_Controller extends Items_Controller { ->where("id", "<>", $photo->id) ->and_open() ->where("name", "=", $form->edit_item->filename->value) - ->orwhere("slug", "=", $form->edit_item->slug->value) + ->or_where("slug", "=", $form->edit_item->slug->value) ->close() ->get() ->current()) { diff --git a/modules/gallery/helpers/album.php b/modules/gallery/helpers/album.php index cd8777e2..0ffb0fc6 100644 --- a/modules/gallery/helpers/album.php +++ b/modules/gallery/helpers/album.php @@ -71,7 +71,7 @@ class album_Core { ->where("parent_id", "=", $parent->id) ->and_open() ->where("name", "=", $album->name) - ->orwhere("slug", "=", $album->slug) + ->or_where("slug", "=", $album->slug) ->close() ->find()->id) { $rand = rand(); diff --git a/modules/gallery/helpers/movie.php b/modules/gallery/helpers/movie.php index 82247eb0..96dafe11 100644 --- a/modules/gallery/helpers/movie.php +++ b/modules/gallery/helpers/movie.php @@ -93,7 +93,7 @@ class movie_Core { ->where("parent_id", "=", $parent->id) ->and_open() ->where("name", "=", $movie->name) - ->orwhere("slug", "=", $movie->slug) + ->or_where("slug", "=", $movie->slug) ->close() ->find()->id) { $rand = rand(); diff --git a/modules/gallery/helpers/photo.php b/modules/gallery/helpers/photo.php index 2a563043..cc309e28 100644 --- a/modules/gallery/helpers/photo.php +++ b/modules/gallery/helpers/photo.php @@ -92,7 +92,7 @@ class photo_Core { ->where("parent_id", "=", $parent->id) ->and_open() ->where("name", "=", $photo->name) - ->orwhere("slug", "=", $photo->slug) + ->or_where("slug", "=", $photo->slug) ->close() ->find()->id) { $rand = rand(); diff --git a/modules/gallery/tests/Database_Test.php b/modules/gallery/tests/Database_Test.php index 4f5a1da2..9b428379 100644 --- a/modules/gallery/tests/Database_Test.php +++ b/modules/gallery/tests/Database_Test.php @@ -32,7 +32,7 @@ class Database_Test extends Unit_Test_Case { ->where("outer1", "=", 1) ->and_open() ->where("inner1", "=", 1) - ->orwhere("inner2", "=", 2) + ->or_where("inner2", "=", 2) ->close() ->where("outer2", "=", 2) ->compile(); @@ -46,7 +46,7 @@ class Database_Test extends Unit_Test_Case { $sql = Database::instance() ->and_open() ->where("inner1", "=", 1) - ->orwhere("inner2", "=", 2) + ->or_where("inner2", "=", 2) ->close() ->where("outer1", "=", 1) ->where("outer2", "=", 2) @@ -62,8 +62,8 @@ class Database_Test extends Unit_Test_Case { ->where("outer1", "=", 1) ->and_open() ->where("inner1", "=", 1) - ->orwhere("inner2", "=", 2) - ->orwhere("inner3", "=", 3)) + ->or_where("inner2", "=", 2) + ->or_where("inner3", "=", 3)) ->close() ->compile(); $sql = str_replace("\n", " ", $sql); diff --git a/modules/search/helpers/search.php b/modules/search/helpers/search.php index c0bb1b32..1fd5175f 100644 --- a/modules/search/helpers/search.php +++ b/modules/search/helpers/search.php @@ -78,7 +78,7 @@ class search_Core { ->join("search_records", "items.id", "search_records.item_id", "left") ->and_open() ->where("search_records.item_id", "=", null) - ->orwhere("search_records.dirty", "=", 1) + ->or_where("search_records.dirty", "=", 1) ->close() ->get() ->count(); diff --git a/modules/search/helpers/search_task.php b/modules/search/helpers/search_task.php index 061f4084..6b35cabc 100644 --- a/modules/search/helpers/search_task.php +++ b/modules/search/helpers/search_task.php @@ -46,7 +46,7 @@ class search_task_Core { foreach (ORM::factory("item") ->join("search_records", "items.id", "search_records.item_id", "left") ->where("search_records.item_id", "=", null) - ->orwhere("search_records.dirty", "=", 1) + ->or_where("search_records.dirty", "=", 1) ->find_all() as $item) { // The query above can take a long time, so start the timer after its done // to give ourselves a little time to actually process rows. -- cgit v1.2.3