mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-06-22 01:19:54 -04:00
Change this files to use the API instead of referencing the group tables directly
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user