$name = Strings::escapeTags(trim($_POST['groupname']));
$r = Model\Group::create(local_user(), $name);
if ($r) {
- info(DI::l10n()->t('Group created.'));
$r = Model\Group::getIdByName(local_user(), $name);
if ($r) {
DI::baseUrl()->redirect('group/' . $r);
}
$groupname = Strings::escapeTags(trim($_POST['groupname']));
if (strlen($groupname) && ($groupname != $group['name'])) {
- if (Model\Group::update($group['id'], $groupname)) {
- info(DI::l10n()->t('Group name changed.'));
+ if (!Model\Group::update($group['id'], $groupname)) {
+ notice(DI::l10n()->t('Group name was not changed.'));
}
}
}
DI::baseUrl()->redirect('contact');
}
- if (Model\Group::remove($a->argv[2])) {
- info(DI::l10n()->t('Group removed.'));
- } else {
+ if (!Model\Group::remove($a->argv[2])) {
notice(DI::l10n()->t('Unable to remove group.'));
}
}