Fixed fileupload in Preordernotification
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user