function group_init(App $a) {
if (local_user()) {
- $a->page['aside'] = Group::sidebarWidget('contacts', 'group', 'extended', (($a->argc > 1) ? $a->argv[1] : 'everyone'));
+ $a->page['aside'] = Model\Group::sidebarWidget('contacts', 'group', 'extended', (($a->argc > 1) ? $a->argv[1] : 'everyone'));
}
}
check_form_security_token_redirectOnErr('/group/new', 'group_edit');
$name = notags(trim($_POST['groupname']));
- $r = Group::create(local_user(), $name);
+ $r = Model\Group::create(local_user(), $name);
if ($r) {
info(L10n::t('Group created.') . EOL);
- $r = Group::getIdByName(local_user(), $name);
+ $r = Model\Group::getIdByName(local_user(), $name);
if ($r) {
goaway(System::baseUrl() . '/group/' . $r);
}
}
}
- $a->page['aside'] = Group::sidebarWidget();
+ $a->page['aside'] = Model\Group::sidebarWidget();
}
return;
}
$result = null;
if (DBA::isResult($r)) {
- $result = Group::removeByName(local_user(), $r[0]['name']);
+ $result = Model\Group::removeByName(local_user(), $r[0]['name']);
}
if ($result) {
if ($change) {
if (in_array($change, $preselected)) {
- Group::removeMember($group['id'], $change);
+ Model\Group::removeMember($group['id'], $change);
} else {
- Group::addMember($group['id'], $change);
+ Model\Group::addMember($group['id'], $change);
}
$members = Model\Contact::getByGroupId($group['id']);
$groupeditor['members'][] = $entry;
} else {
- Group::removeMember($group['id'], $member['id']);
+ Model\Group::removeMember($group['id'], $member['id']);
}
}