Fixed fileupload in Preordernotification

This commit is contained in:
Frank Schubert
2023-01-26 19:44:15 +01:00
parent d2ceb7ead8
commit fabb46851d
2 changed files with 4 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ class File extends mfBaseModel {
$id = $this->id;
// delete file in store
if($this->ubfolder) {
if($this->subfolder) {
$path = MFUPLOAD_FILE_SAVE_PATH."/".$this->subfolder."/".$this->store_filename;
} else {
$path = MFUPLOAD_FILE_SAVE_PATH."/".$this->store_filename;

View File

@@ -345,9 +345,10 @@ class PreordernotificationController extends mfBaseController {
/*
* delete files
*/
//var_dump($r->deletefile);exit;
if(is_array($r->deletefile)) {
foreach($r->deletefile as $pnf_id) {
foreach($r->deletefile as $pnf_id => $check) {
if(!$check) continue;
$pnf = new PreordernotificationFile($pnf_id);
if($pnf->preordernotification_id != $notification->id) continue;
$pnf->file->delete();