From fabb46851dc08d400db7e3e1772ba3823f493151 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Thu, 26 Jan 2023 19:44:15 +0100 Subject: [PATCH] Fixed fileupload in Preordernotification --- application/File/File.php | 2 +- .../Preordernotification/PreordernotificationController.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/application/File/File.php b/application/File/File.php index 512dee644..bf7d0be76 100644 --- a/application/File/File.php +++ b/application/File/File.php @@ -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; diff --git a/application/Preordernotification/PreordernotificationController.php b/application/Preordernotification/PreordernotificationController.php index 609428b50..e8fce8179 100644 --- a/application/Preordernotification/PreordernotificationController.php +++ b/application/Preordernotification/PreordernotificationController.php @@ -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();