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
+1 -1
View File
@@ -15,7 +15,7 @@ class File extends mfBaseModel {
$id = $this->id; $id = $this->id;
// delete file in store // delete file in store
if($this->ubfolder) { if($this->subfolder) {
$path = MFUPLOAD_FILE_SAVE_PATH."/".$this->subfolder."/".$this->store_filename; $path = MFUPLOAD_FILE_SAVE_PATH."/".$this->subfolder."/".$this->store_filename;
} else { } else {
$path = MFUPLOAD_FILE_SAVE_PATH."/".$this->store_filename; $path = MFUPLOAD_FILE_SAVE_PATH."/".$this->store_filename;
@@ -345,9 +345,10 @@ class PreordernotificationController extends mfBaseController {
/* /*
* delete files * delete files
*/ */
//var_dump($r->deletefile);exit;
if(is_array($r->deletefile)) { 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); $pnf = new PreordernotificationFile($pnf_id);
if($pnf->preordernotification_id != $notification->id) continue; if($pnf->preordernotification_id != $notification->id) continue;
$pnf->file->delete(); $pnf->file->delete();