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