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

@ -28,7 +28,7 @@ function like_content(App $a) {
// See if we've been passed a return path to redirect to
$return_path = ((x($_REQUEST,'return')) ? $_REQUEST['return'] : '');
like_content_return(System::baseUrl(), $return_path);
like_content_return($a, $return_path);
killme(); // NOTREACHED
}
@ -36,7 +36,7 @@ function like_content(App $a) {
// Decide how to return. If we were called with a 'return' argument,
// then redirect back to the calling page. If not, just quietly end
function like_content_return($baseurl, $return_path) {
function like_content_return(App $a, $return_path) {
if ($return_path) {
$rand = '_=' . time();
if (strpos($return_path, '?')) {
@ -45,7 +45,7 @@ function like_content_return($baseurl, $return_path) {
$rand = "?$rand";
}
goaway($baseurl . "/" . $return_path . $rand);
$a->redirect($return_path . $rand);
}
killme();