summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/gallery_event.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-12-17 21:16:51 -0800
committerBharat Mediratta <bharat@menalto.com>2009-12-17 21:16:51 -0800
commit9d19e272d672ffc224dfed2799f8e480ecb583e4 (patch)
tree198ee5c3434b71341fb419f3399ad441a363b3ee /modules/gallery/helpers/gallery_event.php
parent8883d1605a12b94fb8f8b5a39ce5b4675b358302 (diff)
Convert some database queries.
Diffstat (limited to 'modules/gallery/helpers/gallery_event.php')
-rw-r--r--modules/gallery/helpers/gallery_event.php25
1 files changed, 12 insertions, 13 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php
index 37f39d15..301432d4 100644
--- a/modules/gallery/helpers/gallery_event.php
+++ b/modules/gallery/helpers/gallery_event.php
@@ -49,19 +49,18 @@ class gallery_event_Core {
static function identity_provider_changed($old_provider, $new_provider) {
$admin = identity::admin_user();
- $db = Database::instance();
- $db->from("tasks")
- ->set(array("owner_id" => $admin->id))
- ->where("1", "=", "1") // @todo why do we need this?
- ->update();
- $db->from("items")
- ->set(array("owner_id" => $admin->id))
- ->where("1", "=", "1") // @todo why do we need this?
- ->update();
- $db->from("logs")
- ->set(array("user_id" => $admin->id))
- ->where("1", "=", "1") // @todo why do we need this?
- ->update();
+ db::build()
+ ->update("tasks")
+ ->set("owner_id", $admin->id)
+ ->execute();
+ db::build()
+ ->update("items")
+ ->set("owner_id", $admin->id)
+ ->execute();
+ db::build()
+ ->update("logs")
+ ->set("user_id", $admin->id)
+ ->execute();
}
static function group_created($group) {