diff --git a/AppMini/New/index.html b/AppMini/New/index.html deleted file mode 100755 index 0519ecba6ea913e21689ec692e81e9e4973fbf73..0000000000000000000000000000000000000000 --- a/AppMini/New/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/Application/Admin/Controller/AppMiniAlipayListController.class.php b/Application/Admin/Controller/AppMiniAlipayListController.class.php index f67d8061bd00576c7b2260112e6ce397c0a16387..daf3f04f6bc0c2620d8fc9e790fe15e293b3ec88 100755 --- a/Application/Admin/Controller/AppMiniAlipayListController.class.php +++ b/Application/Admin/Controller/AppMiniAlipayListController.class.php @@ -76,7 +76,7 @@ class AppMiniAlipayListController extends CommonController $url = __MY_URL__.'AppMini'.DS.'New'.DS.$this->application_name.DS.$temp_file; $result[] = [ 'name' => $temp_file, - 'url' => $url, + 'url' => substr($url, -4) == '.zip' ? $url : '', 'size' => FileSizeByteToUnit(filesize($file_path)), 'time' => date('Y-m-d H:i:s', filectime($file_path)), ]; @@ -165,7 +165,14 @@ class AppMiniAlipayListController extends CommonController } // 删除压缩包 - if(\Library\FileUtil::UnlinkFile($this->new_path.DS.I('id'))) + $path = $this->new_path.DS.I('id'); + if(substr($path, -4) == '.zip') + { + $status = \Library\FileUtil::UnlinkFile($this->new_path.DS.I('id')); + } else { + $status = \Library\FileUtil::UnlinkDir($this->new_path.DS.I('id')); + } + if($status) { $this->ajaxReturn(L('common_operation_delete_success')); } else { diff --git a/Application/Admin/Controller/CacheController.class.php b/Application/Admin/Controller/CacheController.class.php index a3b416f65520d7956b34b898189c7ccdf86704bd..6212827fcf3da58826a710a71c25f8c4cf45d654 100755 --- a/Application/Admin/Controller/CacheController.class.php +++ b/Application/Admin/Controller/CacheController.class.php @@ -52,13 +52,9 @@ class CacheController extends CommonController */ public function SiteUpdate() { - DelDirFile(TEMP_PATH); - DelDirFile(DATA_PATH); - if(file_exists(RUNTIME_PATH.'common~runtime.php')) - { - unlink(RUNTIME_PATH.'common~runtime.php'); - } - + \Library\FileUtil::UnlinkDir(TEMP_PATH); + \Library\FileUtil::UnlinkDir(DATA_PATH); + \Library\FileUtil::UnlinkFile(RUNTIME_PATH.'common~runtime.php'); $this->success(L('common_operation_update_success')); } @@ -72,7 +68,7 @@ class CacheController extends CommonController public function TemplateUpdate() { // 模板 Cache - DelDirFile(CACHE_PATH); + \Library\FileUtil::UnlinkDir(CACHE_PATH); $this->success(L('common_operation_update_success')); } diff --git a/Application/Admin/Controller/ThemeController.class.php b/Application/Admin/Controller/ThemeController.class.php index cb114419bde0ec4d80b430d29b45cb00dd41c137..480631517d9e95313a416e88ce9f8ea1d5e19b6b 100755 --- a/Application/Admin/Controller/ThemeController.class.php +++ b/Application/Admin/Controller/ThemeController.class.php @@ -168,7 +168,7 @@ class ThemeController extends CommonController } // 开始删除主题 - if(DelDirFile($this->html_path.$id, true) && DelDirFile($this->static_path.$id, true)) + if(\Library\FileUtil::UnlinkDir($this->html_path.$id) && \Library\FileUtil::UnlinkDir($this->static_path.$id)) { $this->ajaxReturn(L('common_operation_delete_success')); } else { diff --git a/Application/Admin/View/Default/AppMiniAlipayList/Index.html b/Application/Admin/View/Default/AppMiniAlipayList/Index.html index 205c526140e3cea9f6299ecdd1e14230a14f3aee..98b3cbaa6c7eff2579e112b6488e23b3925ce813 100755 --- a/Application/Admin/View/Default/AppMiniAlipayList/Index.html +++ b/Application/Admin/View/Default/AppMiniAlipayList/Index.html @@ -27,9 +27,11 @@