diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-12-16 18:04:44 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-12-16 18:04:44 -0800 |
commit | f431d7e12e0be10cfd7ea30543a44cf17a4e8275 (patch) | |
tree | 3a2934756167cfb4d540983caddc87782f8dbd8c | |
parent | 86467363c20c6150ee0fccc7901cd34b281be2b1 (diff) |
Convert a database call.
-rw-r--r-- | modules/gallery/controllers/photos.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gallery/controllers/photos.php b/modules/gallery/controllers/photos.php index f7c5039e..ced9da2f 100644 --- a/modules/gallery/controllers/photos.php +++ b/modules/gallery/controllers/photos.php @@ -76,7 +76,7 @@ class Photos_Controller extends Items_Controller { if ($form->edit_item->filename->value != $photo->name || $form->edit_item->slug->value != $photo->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", "=", $photo->parent_id) @@ -85,7 +85,7 @@ class Photos_Controller extends Items_Controller { ->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); |