summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/gallery_event.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-12-06 21:34:09 -0800
committerBharat Mediratta <bharat@menalto.com>2009-12-06 21:34:09 -0800
commitdec084fe08db1505d272e6a577b8627f57abef16 (patch)
tree98c5071aa5d888395da45a68fe82b1c4b4d9d48a /modules/gallery/helpers/gallery_event.php
parent2f5c612036984a6f09995e8c692f399fb8c7fb15 (diff)
Update database queries.
Diffstat (limited to 'modules/gallery/helpers/gallery_event.php')
-rw-r--r--modules/gallery/helpers/gallery_event.php22
1 files changed, 12 insertions, 10 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php
index fa4db317..37f39d15 100644
--- a/modules/gallery/helpers/gallery_event.php
+++ b/modules/gallery/helpers/gallery_event.php
@@ -30,19 +30,21 @@ class gallery_event_Core {
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) {