Change this files to use the API instead of referencing the group tables directly

This commit is contained in:
Tim Almdal
2009-10-21 11:50:42 -07:00
parent f04177f138
commit b528fbde57
3 changed files with 5 additions and 2 deletions

View File

@@ -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));
}

View File

@@ -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) {

View File

@@ -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();