Readied error pages for variable themes.
Fixed error in parsing pseudocode.
This commit is contained in:
@ -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");
|
||||
|
Reference in New Issue
Block a user