diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/templates/403.php | 8 | ||||
-rw-r--r-- | core/templates/404.php | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/core/templates/403.php b/core/templates/403.php index 7d07c72c873..e053fad764a 100644 --- a/core/templates/403.php +++ b/core/templates/403.php @@ -1,10 +1,10 @@ <?php // @codeCoverageIgnoreStart -if(!isset($_)) {//also provide standalone error page +if(!isset($_)) {//standalone page is not supported anymore - redirect to / require_once '../../lib/base.php'; - - $tmpl = new OC_Template( '', '403', 'guest' ); - $tmpl->printPage(); + + $urlGenerator = \OC::$server->getURLGenerator(); + header('Location: ' . $urlGenerator->getAbsoluteURL('/')); exit; } // @codeCoverageIgnoreEnd diff --git a/core/templates/404.php b/core/templates/404.php index cc45cbeaf5d..0f7318e937a 100644 --- a/core/templates/404.php +++ b/core/templates/404.php @@ -3,11 +3,11 @@ /** @var $l \OCP\IL10N */ /** @var $theme OCP\Defaults */ // @codeCoverageIgnoreStart -if(!isset($_)) {//also provide standalone error page +if(!isset($_)) {//standalone page is not supported anymore - redirect to / require_once '../../lib/base.php'; - - $tmpl = new OC_Template( '', '404', 'guest' ); - $tmpl->printPage(); + + $urlGenerator = \OC::$server->getURLGenerator(); + header('Location: ' . $urlGenerator->getAbsoluteURL('/')); exit; } // @codeCoverageIgnoreEnd |