mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-11 22:04:26 +02:00
The notice and info have been moved
This commit is contained in:
parent
20291ddc2b
commit
fdfa1f8630
73 changed files with 273 additions and 284 deletions
|
@ -42,14 +42,14 @@ class Index extends BaseUsers
|
|||
foreach ($users as $uid) {
|
||||
User::block($uid);
|
||||
}
|
||||
info(DI::l10n()->tt('%s user blocked', '%s users blocked', count($users)));
|
||||
DI::sysmsg()->addInfo(DI::l10n()->tt('%s user blocked', '%s users blocked', count($users)));
|
||||
}
|
||||
|
||||
if (!empty($_POST['page_users_unblock'])) {
|
||||
foreach ($users as $uid) {
|
||||
User::block($uid, false);
|
||||
}
|
||||
info(DI::l10n()->tt('%s user unblocked', '%s users unblocked', count($users)));
|
||||
DI::sysmsg()->addInfo(DI::l10n()->tt('%s user unblocked', '%s users unblocked', count($users)));
|
||||
}
|
||||
|
||||
if (!empty($_POST['page_users_delete'])) {
|
||||
|
@ -57,11 +57,11 @@ class Index extends BaseUsers
|
|||
if (local_user() != $uid) {
|
||||
User::remove($uid);
|
||||
} else {
|
||||
notice(DI::l10n()->t('You can\'t remove yourself'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('You can\'t remove yourself'));
|
||||
}
|
||||
}
|
||||
|
||||
info(DI::l10n()->tt('%s user deleted', '%s users deleted', count($users)));
|
||||
DI::sysmsg()->addInfo(DI::l10n()->tt('%s user deleted', '%s users deleted', count($users)));
|
||||
}
|
||||
|
||||
DI::baseUrl()->redirect(DI::args()->getQueryString());
|
||||
|
@ -77,7 +77,7 @@ class Index extends BaseUsers
|
|||
if ($uid) {
|
||||
$user = User::getById($uid, ['username', 'blocked']);
|
||||
if (!DBA::isResult($user)) {
|
||||
notice(DI::l10n()->t('User not found'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('User not found'));
|
||||
DI::baseUrl()->redirect('admin/users');
|
||||
return ''; // NOTREACHED
|
||||
}
|
||||
|
@ -90,9 +90,9 @@ class Index extends BaseUsers
|
|||
// delete user
|
||||
User::remove($uid);
|
||||
|
||||
notice(DI::l10n()->t('User "%s" deleted', $user['username']));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('User "%s" deleted', $user['username']));
|
||||
} else {
|
||||
notice(DI::l10n()->t('You can\'t remove yourself'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('You can\'t remove yourself'));
|
||||
}
|
||||
|
||||
DI::baseUrl()->redirect('admin/users');
|
||||
|
@ -100,13 +100,13 @@ class Index extends BaseUsers
|
|||
case 'block':
|
||||
self::checkFormSecurityTokenRedirectOnError('admin/users', 'admin_users', 't');
|
||||
User::block($uid);
|
||||
notice(DI::l10n()->t('User "%s" blocked', $user['username']));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('User "%s" blocked', $user['username']));
|
||||
DI::baseUrl()->redirect('admin/users');
|
||||
break;
|
||||
case 'unblock':
|
||||
self::checkFormSecurityTokenRedirectOnError('admin/users', 'admin_users', 't');
|
||||
User::block($uid, false);
|
||||
notice(DI::l10n()->t('User "%s" unblocked', $user['username']));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('User "%s" unblocked', $user['username']));
|
||||
DI::baseUrl()->redirect('admin/users');
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue