Renamed System::redirect() to $a->redirect()

This commit is contained in:
Philipp Holzer 2018-10-13 20:02:04 +02:00
commit 2ef81108b3
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
62 changed files with 269 additions and 253 deletions

View file

@ -62,7 +62,7 @@ function delegate_content(App $a)
if ($a->argc > 2 && $a->argv[1] === 'add' && intval($a->argv[2])) {
// delegated admins can view but not change delegation permissions
if (x($_SESSION, 'submanage')) {
goaway(System::baseUrl() . '/delegate');
$a->redirect('delegate');
}
$user_id = $a->argv[2];
@ -77,17 +77,17 @@ function delegate_content(App $a)
DBA::insert('manage', ['uid' => $user_id, 'mid' => local_user()]);
}
}
goaway(System::baseUrl() . '/delegate');
$a->redirect('delegate');
}
if ($a->argc > 2 && $a->argv[1] === 'remove' && intval($a->argv[2])) {
// delegated admins can view but not change delegation permissions
if (x($_SESSION, 'submanage')) {
goaway(System::baseUrl() . '/delegate');
$a->redirect('delegate');
}
DBA::delete('manage', ['uid' => $a->argv[2], 'mid' => local_user()]);
goaway(System::baseUrl() . '/delegate');
$a->redirect('delegate');
}
// find everybody that currently has delegated management to this account/page