Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update database queries.

  • Loading branch information...
commit dec084fe08db1505d272e6a577b8627f57abef16 1 parent 2f5c612
@bharat bharat authored
Showing with 12 additions and 10 deletions.
  1. +12 −10 modules/gallery/helpers/gallery_event.php
View
22 modules/gallery/helpers/gallery_event.php
@@ -30,19 +30,21 @@ static function gallery_ready() {
static function user_deleted($user) {
$admin = identity::admin_user();
- $db = Database::instance();
- $db->from("tasks")
- ->set(array("owner_id" => $admin->id))
+ db::build()
+ ->update("tasks")
+ ->set("owner_id", $admin->id)
->where("owner_id", "=", $user->id)
- ->update();
- $db->from("items")
- ->set(array("owner_id" => $admin->id))
+ ->execute();
+ db::build()
+ ->update("items")
+ ->set("owner_id", $admin->id)
->where("owner_id", "=", $user->id)
- ->update();
- $db->from("logs")
- ->set(array("user_id" => $admin->id))
+ ->execute();
+ db::build()
+ ->update("logs")
+ ->set("user_id", $admin->id)
->where("user_id", "=", $user->id)
- ->update();
+ ->execute();
}
static function identity_provider_changed($old_provider, $new_provider) {
Please sign in to comment.
Something went wrong with that request. Please try again.