diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-21 11:50:42 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-21 11:50:42 -0700 |
commit | b528fbde579b76cdab098a0319fdfbded93bee4a (patch) | |
tree | 90563682a113797d2d97a6baceb36c066822f6b6 /modules | |
parent | f04177f138df71e6317073b12b754a1c32d0c523 (diff) |
Change this files to use the API instead of referencing the group tables directly
Diffstat (limited to 'modules')
-rw-r--r-- | modules/g2_import/helpers/g2_import.php | 2 | ||||
-rw-r--r-- | modules/gallery/helpers/gallery_installer.php | 2 | ||||
-rw-r--r-- | modules/notification/helpers/notification.php | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 8b48f727..d24aab93 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -301,7 +301,7 @@ class g2_import_Core { $user->admin = true; $message .= t("\n\tAdded 'admin' flag to user"); } else { - $group = ORM::factory("group", self::map($g2_group_id)); + $group = Identity::lookup_group(self::map($g2_group_id)); $user->add($group); $message .= t("\n\tAdded user to group '%group'.", array("group" => $group->name)); } diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php index b1ea1f19..10e796fd 100644 --- a/modules/gallery/helpers/gallery_installer.php +++ b/modules/gallery/helpers/gallery_installer.php @@ -317,7 +317,7 @@ class gallery_installer { } if ($version == 7) { - $groups = ORM::factory("group")->find_all(); + $groups = Identity::groups(); $permissions = ORM::factory("permission")->find_all(); foreach($groups as $group) { foreach($permissions as $permission) { diff --git a/modules/notification/helpers/notification.php b/modules/notification/helpers/notification.php index 64eed8dc..080f154b 100644 --- a/modules/notification/helpers/notification.php +++ b/modules/notification/helpers/notification.php @@ -78,6 +78,9 @@ class notification { $subscriber_ids[] = $subscriber->user_id; } + if (empty($subscriber_ids)) { + return array(); + } $users = Identity::get_user_list($subscriber_ids); $subscribers = array(); |