Replaced goaway() with System::redirectTo()

This commit is contained in:
Philipp Holzer 2018-10-13 20:05:05 +02:00
parent a95606a10a
commit 3d3a11fa46
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
5 changed files with 13 additions and 8 deletions

View file

@ -54,6 +54,7 @@ use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Core\System;
function blackout_install() {
Hook::register('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
@ -86,8 +87,8 @@ function blackout_redirect ($a, $b) {
$date2 = 0;
}
if (( $date1 <= $now ) && ( $now <= $date2 )) {
Logger::log('redirecting user to blackout page');
System::externalRedirect($myurl);
logger('redirecting user to blackout page');
System::redirectTo($myurl);
}
}