Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Convert a database call.

  • Loading branch information...
commit 86467363c20c6150ee0fccc7901cd34b281be2b1 1 parent 9b3b9c6
@bharat bharat authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 modules/gallery/controllers/movies.php
View
6 modules/gallery/controllers/movies.php
@@ -76,16 +76,16 @@ public function update($movie_id) {
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);
Please sign in to comment.
Something went wrong with that request. Please try again.