summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-12-13 17:15:59 -0800
committerBharat Mediratta <bharat@menalto.com>2009-12-13 17:15:59 -0800
commit064a24b897880e4dbf4dafeb756406bbd907bdba (patch)
treeacdd642d57a9de23ec4776098bc4520bd56d2f03
parent8c03c7a073df7d210e1e961797cc39fd124ec390 (diff)
Convert a database call.
-rw-r--r--modules/gallery/controllers/albums.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php
index 76032655..319f1416 100644
--- a/modules/gallery/controllers/albums.php
+++ b/modules/gallery/controllers/albums.php
@@ -132,7 +132,7 @@ class Albums_Controller extends Items_Controller {
$form->edit_item->dirname->value != $album->name ||
$form->edit_item->slug->value != $album->slug) {
// Make sure that there's not a conflict
- if ($row = Database::instance()
+ if ($row = db::build()
->select(array("name", "slug"))
->from("items")
->where("parent_id", "=", $album->parent_id)
@@ -141,7 +141,7 @@ class Albums_Controller extends Items_Controller {
->where("name", "=", $form->edit_item->dirname->value)
->or_where("slug", "=", $form->edit_item->slug->value)
->close()
- ->get()
+ ->execute()
->current()) {
if ($row->name == $form->edit_item->dirname->value) {
$form->edit_item->dirname->add_error("name_conflict", 1);