mirror of
https://github.com/friendica/friendica
synced 2025-04-19 09:50:11 +00:00
Refactor deprecated App::internalRedirect() to DI::baseUrl()->redirect()
This commit is contained in:
parent
cc9b7bb14f
commit
8e6973b774
77 changed files with 263 additions and 259 deletions
|
@ -30,7 +30,7 @@ class Group extends BaseModule
|
|||
|
||||
if (!local_user()) {
|
||||
notice(L10n::t('Permission denied.'));
|
||||
$a->internalRedirect();
|
||||
DI::baseUrl()->redirect();
|
||||
}
|
||||
|
||||
// @TODO: Replace with parameter from router
|
||||
|
@ -43,12 +43,12 @@ class Group extends BaseModule
|
|||
info(L10n::t('Group created.'));
|
||||
$r = Model\Group::getIdByName(local_user(), $name);
|
||||
if ($r) {
|
||||
$a->internalRedirect('group/' . $r);
|
||||
DI::baseUrl()->redirect('group/' . $r);
|
||||
}
|
||||
} else {
|
||||
notice(L10n::t('Could not create group.'));
|
||||
}
|
||||
$a->internalRedirect('group');
|
||||
DI::baseUrl()->redirect('group');
|
||||
}
|
||||
|
||||
// @TODO: Replace with parameter from router
|
||||
|
@ -58,7 +58,7 @@ class Group extends BaseModule
|
|||
$group = DBA::selectFirst('group', ['id', 'name'], ['id' => $a->argv[1], 'uid' => local_user()]);
|
||||
if (!DBA::isResult($group)) {
|
||||
notice(L10n::t('Group not found.'));
|
||||
$a->internalRedirect('contact');
|
||||
DI::baseUrl()->redirect('contact');
|
||||
}
|
||||
$groupname = Strings::escapeTags(trim($_POST['groupname']));
|
||||
if (strlen($groupname) && ($groupname != $group['name'])) {
|
||||
|
@ -142,7 +142,7 @@ class Group extends BaseModule
|
|||
// With no group number provided we jump to the unassigned contacts as a starting point
|
||||
// @TODO: Replace with parameter from router
|
||||
if ($a->argc == 1) {
|
||||
$a->internalRedirect('group/none');
|
||||
DI::baseUrl()->redirect('group/none');
|
||||
}
|
||||
|
||||
// Switch to text mode interface if we have more than 'n' contacts or group members
|
||||
|
@ -200,7 +200,7 @@ class Group extends BaseModule
|
|||
if (intval($a->argv[2])) {
|
||||
if (!Model\Group::exists($a->argv[2], local_user())) {
|
||||
notice(L10n::t('Group not found.'));
|
||||
$a->internalRedirect('contact');
|
||||
DI::baseUrl()->redirect('contact');
|
||||
}
|
||||
|
||||
if (Model\Group::remove($a->argv[2])) {
|
||||
|
@ -209,7 +209,7 @@ class Group extends BaseModule
|
|||
notice(L10n::t('Unable to remove group.'));
|
||||
}
|
||||
}
|
||||
$a->internalRedirect('group');
|
||||
DI::baseUrl()->redirect('group');
|
||||
}
|
||||
|
||||
// @TODO: Replace with parameter from router
|
||||
|
@ -226,7 +226,7 @@ class Group extends BaseModule
|
|||
$group = DBA::selectFirst('group', ['id', 'name'], ['id' => $a->argv[1], 'uid' => local_user(), 'deleted' => false]);
|
||||
if (!DBA::isResult($group)) {
|
||||
notice(L10n::t('Group not found.'));
|
||||
$a->internalRedirect('contact');
|
||||
DI::baseUrl()->redirect('contact');
|
||||
}
|
||||
|
||||
$members = Model\Contact::getByGroupId($group['id']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue