Saving Preordernotification and test email done

This commit is contained in:
Frank Schubert
2023-01-26 19:24:35 +01:00
parent 844e6ccd2a
commit d2ceb7ead8
14 changed files with 791 additions and 100 deletions

View File

@@ -13,15 +13,30 @@ class mfUpload_TmpFile {
public function __construct($_file) {
$this->log = mfLoghandler::singleton();
if(is_array($_file) && count($_file) == 2) {
$upload_name = $_file[0];
$index = $_file[1];
$upload = [
'name' => $_FILES[$upload_name]['name'][$index],
'full_path' => $_FILES[$upload_name]['full_path'][$index],
'type' => $_FILES[$upload_name]['type'][$index],
'tmp_name' => $_FILES[$upload_name]['tmp_name'][$index],
'error' => $_FILES[$upload_name]['error'][$index],
'size' => $_FILES[$upload_name]['size'][$index],
];
} else {
$upload = $_FILES[$_file];
}
if(count($_FILES[$_file])) {
$this->_file = $_FILES[$_file];
if(count($upload)) {
$this->_file = $upload;
} else {
$this->errormessage = "Upload not found";
return false;
}
$this->filename = $this->_file['name'];
$this->error = $this->_file['error'];
$this->tmp_name = $this->_file['tmp_name'];
@@ -81,7 +96,7 @@ class mfUpload_TmpFile {
$ext = strtolower(array_pop($parts));
if(!preg_match('/^'.MFUPLOAD_ALLOWED_EXTENSIONS.'$/i',$ext)) {
$this->errormessage = "File type not allowed. Supported file types are ".ALLOWED_EXTENSIONS_STR;
$this->errormessage = "File type not allowed. Supported file types are ".MFUPLOAD_ALLOWED_EXTENSIONS_STR;
return false;
}