Readied error pages for variable themes.

Fixed error in parsing pseudocode.
This commit is contained in:
2018-06-21 13:25:38 +02:00
committed by Stefan Rohde-Enslin
parent b340c7efff
commit 4e06d0bae7
18 changed files with 84 additions and 81 deletions

View File

@ -81,17 +81,17 @@ else if ($task == "upload") {
// Whitelist of allowed types.
if (!in_array($_FILES['file']['type'], $allowedFiletypes)) {
printErrorPage($translations['filetypeNotWhitelisted']);
echo printErrorPage($settings, $translations['filetypeNotWhitelisted']);
return;
}
if (filesize($_FILES['file']['tmp_name']) > 300000) {
printErrorPage($translations['fileTooLarge']);
if (filesize($_FILES['file']['tmp_name']) > $settings['maxFileSize']) {
echo printErrorPage($settings, $translations['fileTooLarge']);
return;
}
if (!(move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile))) {
printErrorPage($translations['fileUploadError']);
echo printErrorPage($settings, $translations['fileUploadError']);
return;
}
@ -106,7 +106,7 @@ else if ($task == "upload") {
else if ($task == "delete") {
if (!is_file(fileDir . "/$subject")) {
printErrorPage($translations['fileDoesNotExist']); return;
echo printErrorPage($settings, $translations['fileDoesNotExist']); return;
}
unlink(fileDir . "/$subject");