mirror of
https://github.com/friendica/friendica
synced 2025-04-24 01:50:17 +00:00
Replace remaining occurrences of admin/users route by moderation/users
This commit is contained in:
parent
939a80ceb0
commit
0a20566199
16 changed files with 67 additions and 67 deletions
|
@ -32,7 +32,7 @@ class Create extends BaseUsers
|
|||
{
|
||||
$this->checkModerationAccess();
|
||||
|
||||
self::checkFormSecurityTokenRedirectOnError('/admin/users/create', 'admin_users_create');
|
||||
self::checkFormSecurityTokenRedirectOnError('moderation/users/create', 'admin_users_create');
|
||||
|
||||
$nu_name = $request['new_user_name'] ?? '';
|
||||
$nu_nickname = $request['new_user_nickname'] ?? '';
|
||||
|
@ -42,20 +42,20 @@ class Create extends BaseUsers
|
|||
if ($nu_name !== '' && $nu_email !== '' && $nu_nickname !== '') {
|
||||
try {
|
||||
User::createMinimal($nu_name, $nu_email, $nu_nickname, $nu_language);
|
||||
$this->baseUrl->redirect('admin/users');
|
||||
$this->baseUrl->redirect('moderation/users');
|
||||
} catch (\Exception $ex) {
|
||||
$this->systemMessages->addNotice($ex->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
$this->baseUrl->redirect('admin/users/create');
|
||||
$this->baseUrl->redirect('moderation/users/create');
|
||||
}
|
||||
|
||||
protected function content(array $request = []): string
|
||||
{
|
||||
parent::content();
|
||||
|
||||
$t = Renderer::getMarkupTemplate('admin/users/create.tpl');
|
||||
$t = Renderer::getMarkupTemplate('moderation/users/create.tpl');
|
||||
return self::getTabsHTML('all') . Renderer::replaceMacros($t, [
|
||||
// strings //
|
||||
'$title' => $this->t('Administration'),
|
||||
|
|
|
@ -33,7 +33,7 @@ class Pending extends BaseUsers
|
|||
{
|
||||
$this->checkModerationAccess();
|
||||
|
||||
self::checkFormSecurityTokenRedirectOnError('/admin/users/pending', 'admin_users_pending');
|
||||
self::checkFormSecurityTokenRedirectOnError('moderation/users/pending', 'admin_users_pending');
|
||||
|
||||
$pending = $request['pending'] ?? [];
|
||||
|
||||
|
@ -51,7 +51,7 @@ class Pending extends BaseUsers
|
|||
$this->systemMessages->addInfo($this->tt('%s registration revoked', '%s registrations revoked', count($pending)));
|
||||
}
|
||||
|
||||
$this->baseUrl->redirect('admin/users/pending');
|
||||
$this->baseUrl->redirect('moderation/users/pending');
|
||||
}
|
||||
|
||||
protected function content(array $request = []): string
|
||||
|
@ -65,22 +65,22 @@ class Pending extends BaseUsers
|
|||
$user = User::getById($uid, ['username', 'blocked']);
|
||||
if (!$user) {
|
||||
$this->systemMessages->addNotice($this->t('User not found'));
|
||||
$this->baseUrl->redirect('admin/users');
|
||||
$this->baseUrl->redirect('moderation/users');
|
||||
}
|
||||
}
|
||||
|
||||
switch ($action) {
|
||||
case 'allow':
|
||||
self::checkFormSecurityTokenRedirectOnError('/admin/users/pending', 'admin_users_pending', 't');
|
||||
self::checkFormSecurityTokenRedirectOnError('moderation/users/pending', 'admin_users_pending', 't');
|
||||
User::allow(Register::getPendingForUser($uid)['hash'] ?? '');
|
||||
$this->systemMessages->addNotice($this->t('Account approved.'));
|
||||
$this->baseUrl->redirect('admin/users/pending');
|
||||
$this->baseUrl->redirect('moderation/users/pending');
|
||||
break;
|
||||
case 'deny':
|
||||
self::checkFormSecurityTokenRedirectOnError('/admin/users/pending', 'admin_users_pending', 't');
|
||||
self::checkFormSecurityTokenRedirectOnError('moderation/users/pending', 'admin_users_pending', 't');
|
||||
User::deny(Register::getPendingForUser($uid)['hash'] ?? '');
|
||||
$this->systemMessages->addNotice($this->t('Registration revoked'));
|
||||
$this->baseUrl->redirect('admin/users/pending');
|
||||
$this->baseUrl->redirect('moderation/users/pending');
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ class Pending extends BaseUsers
|
|||
|
||||
$count = Register::getPendingCount();
|
||||
|
||||
$t = Renderer::getMarkupTemplate('admin/users/pending.tpl');
|
||||
$t = Renderer::getMarkupTemplate('moderation/users/pending.tpl');
|
||||
return self::getTabsHTML('pending') . Renderer::replaceMacros($t, [
|
||||
// strings //
|
||||
'$title' => $this->t('Administration'),
|
||||
|
|
|
@ -241,7 +241,7 @@ class Ping extends BaseModule
|
|||
],
|
||||
$this->l10n->t('{0} requested registration'),
|
||||
new \DateTime($reg['created'], new \DateTimeZone('UTC')),
|
||||
new Uri($this->baseUrl->get(true) . '/admin/users/pending')
|
||||
new Uri($this->baseUrl->get(true) . '/moderation/users/pending')
|
||||
);
|
||||
}
|
||||
} elseif (count($registrations) > 1) {
|
||||
|
@ -252,7 +252,7 @@ class Ping extends BaseModule
|
|||
],
|
||||
$this->l10n->t('{0} and %d others requested registration', count($registrations) - 1),
|
||||
new \DateTime($registrations[0]['created'], new \DateTimeZone('UTC')),
|
||||
new Uri($this->baseUrl->get(true) . '/admin/users/pending')
|
||||
new Uri($this->baseUrl->get(true) . '/moderation/users/pending')
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -406,11 +406,11 @@ class Register extends BaseModule
|
|||
'type' => Model\Notification\Type::SYSTEM,
|
||||
'event' => $event,
|
||||
'uid' => $admin['uid'],
|
||||
'link' => DI::baseUrl()->get(true) . '/admin/users/',
|
||||
'link' => DI::baseUrl()->get(true) . '/moderation/users/',
|
||||
'source_name' => $user['username'],
|
||||
'source_mail' => $user['email'],
|
||||
'source_nick' => $user['nickname'],
|
||||
'source_link' => DI::baseUrl()->get(true) . '/admin/users/',
|
||||
'source_link' => DI::baseUrl()->get(true) . '/moderation/users/',
|
||||
'source_photo' => User::getAvatarUrl($user, Proxy::SIZE_THUMB),
|
||||
'show_in_notification_page' => false
|
||||
]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue