mirror of
https://github.com/friendica/friendica
synced 2025-02-21 07:26:48 +00:00
Merge branch 'develop' into new-addonproxy
This commit is contained in:
commit
a006aba9d4
3 changed files with 10 additions and 6 deletions
|
@ -124,8 +124,8 @@ class Active extends BaseUsers
|
|||
*/
|
||||
private function processGetActions(): void
|
||||
{
|
||||
$action = (string)$this->parameters['action'] ?? '';
|
||||
$uid = (int)$this->parameters['uid'] ?? 0;
|
||||
$action = (string) ($this->parameters['action'] ?? '');
|
||||
$uid = (int) ($this->parameters['uid'] ?? 0);
|
||||
|
||||
if ($uid === 0) {
|
||||
return;
|
||||
|
@ -150,6 +150,7 @@ class Active extends BaseUsers
|
|||
}
|
||||
|
||||
$this->baseUrl->redirect('moderation/users/active');
|
||||
// no break
|
||||
case 'block':
|
||||
self::checkFormSecurityTokenRedirectOnError('moderation/users/active', 'moderation_users_active', 't');
|
||||
User::block($uid);
|
||||
|
|
|
@ -123,8 +123,8 @@ class Blocked extends BaseUsers
|
|||
*/
|
||||
private function processGetActions(): void
|
||||
{
|
||||
$action = (string)$this->parameters['action'] ?? '';
|
||||
$uid = (int)$this->parameters['uid'] ?? 0;
|
||||
$action = (string) ($this->parameters['action'] ?? '');
|
||||
$uid = (int) ($this->parameters['uid'] ?? 0);
|
||||
|
||||
if ($uid === 0) {
|
||||
return;
|
||||
|
@ -148,6 +148,7 @@ class Blocked extends BaseUsers
|
|||
$this->systemMessages->addNotice($this->t('You can\'t remove yourself'));
|
||||
}
|
||||
$this->baseUrl->redirect('moderation/users/blocked');
|
||||
// no break
|
||||
case 'unblock':
|
||||
self::checkFormSecurityTokenRedirectOnError('/moderation/users/blocked', 'moderation_users_blocked', 't');
|
||||
User::block($uid, false);
|
||||
|
|
|
@ -135,8 +135,8 @@ class Index extends BaseUsers
|
|||
*/
|
||||
private function processGetActions(): void
|
||||
{
|
||||
$action = (string) $this->parameters['action'] ?? '';
|
||||
$uid = (int) $this->parameters['uid'] ?? 0;
|
||||
$action = (string) ($this->parameters['action'] ?? '');
|
||||
$uid = (int) ($this->parameters['uid'] ?? 0);
|
||||
|
||||
if ($uid === 0) {
|
||||
return;
|
||||
|
@ -161,11 +161,13 @@ class Index extends BaseUsers
|
|||
}
|
||||
|
||||
$this->baseUrl->redirect('moderation/users');
|
||||
// no break
|
||||
case 'block':
|
||||
self::checkFormSecurityTokenRedirectOnError('moderation/users', 'moderation_users', 't');
|
||||
User::block($uid);
|
||||
$this->systemMessages->addNotice($this->t('User "%s" blocked', $user['username']));
|
||||
$this->baseUrl->redirect('moderation/users');
|
||||
// no break
|
||||
case 'unblock':
|
||||
self::checkFormSecurityTokenRedirectOnError('moderation/users', 'moderation_users', 't');
|
||||
User::block($uid, false);
|
||||
|
|
Loading…
Add table
Reference in a new issue