diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-12-16 18:03:23 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-12-16 18:03:23 -0800 |
commit | 86467363c20c6150ee0fccc7901cd34b281be2b1 (patch) | |
tree | 1989795d82faea8910a5ffd6c58a6a406e2e4df2 /modules | |
parent | 9b3b9c6da640ee3856cc113917faef34ba77e3db (diff) |
Convert a database call.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/controllers/movies.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/gallery/controllers/movies.php b/modules/gallery/controllers/movies.php index 6e25e6ea..b5785ecf 100644 --- a/modules/gallery/controllers/movies.php +++ b/modules/gallery/controllers/movies.php @@ -76,16 +76,16 @@ class Movies_Controller extends Items_Controller { if ($form->edit_item->filename->value != $movie->name || $form->edit_item->slug->value != $movie->slug) { // Make sure that there's not a name or slug conflict - if ($row = Database::instance() + if ($row = db::build() ->select(array("name", "slug")) ->from("items") ->where("parent_id", "=", $movie->parent_id) - ->where("id <>", $movie->id) + ->where("id", "<>", $movie->id) ->and_open() ->where("name", "=", $form->edit_item->filename->value) ->or_where("slug", "=", $form->edit_item->slug->value) ->close() - ->get() + ->execute() ->current()) { if ($row->name == $form->edit_item->filename->value) { $form->edit_item->filename->add_error("name_conflict", 1); |