Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions core/templates/403.php
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions core/templates/404.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/private/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,10 +449,10 @@ public static function updateHtaccess() {
$htaccessContent = explode($content, $htaccessContent, 2)[0];

//custom 403 error page
$content.= "\nErrorDocument 403 ".$webRoot."/core/templates/403.php";
$content.= "\nErrorDocument 403 ".$webRoot."/";

//custom 404 error page
$content.= "\nErrorDocument 404 ".$webRoot."/core/templates/404.php";
$content.= "\nErrorDocument 404 ".$webRoot."/";

// Add rewrite rules if the RewriteBase is configured
$rewriteBase = $config->getValue('htaccess.RewriteBase', '');
Expand Down
20 changes: 0 additions & 20 deletions tests/Core/Templates/TemplatesTest.php

This file was deleted.