DirProtections and DirOptions stuff

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2018-03-15 19:35:56 +01:00
parent 858a9ba6a4
commit 7a68dfc450
4 changed files with 396 additions and 150 deletions

View File

@@ -20,13 +20,14 @@
* refs #267
*
* @param string error-document-string
* @param bool $throw_exception
*
* @return string error-document-string
*
*/
function correctErrorDocument($errdoc = null) {
function correctErrorDocument($errdoc = null, $throw_exception = false) {
global $idna_convert;
$idna_convert = new idna_convert_wrapper();
if ($errdoc !== null && $errdoc != '') {
// not a URL
@@ -46,14 +47,14 @@ function correctErrorDocument($errdoc = null) {
else {
// string won't work for lighty
if (Settings::Get('system.webserver') == 'lighttpd') {
standard_error('stringerrordocumentnotvalidforlighty');
standard_error('stringerrordocumentnotvalidforlighty', '', $throw_exception);
} elseif(substr($errdoc, -1) != '"') {
$errdoc .= '"';
}
}
} else {
if (Settings::Get('system.webserver') == 'lighttpd') {
standard_error('urlerrordocumentnotvalidforlighty');
standard_error('urlerrordocumentnotvalidforlighty', '', $throw_exception);
}
}
}