* finish task #7798.
This commit is contained in:
@@ -48,5 +48,6 @@ $config->upgrade->discardedBugTypes['zh-tw']['designchange'] = '設計變更';
|
||||
$config->upgrade->discardedBugTypes['zh-tw']['newfeature'] = "新增需求";
|
||||
$config->upgrade->discardedBugTypes['zh-tw']['trackthings'] = '事務跟蹤';
|
||||
|
||||
$config->delete['10.6'][] = 'module/chat/ext/control/extensions.php';
|
||||
$config->delete['10.6'][] = 'module/common/ext/model/xuanxuan.php';
|
||||
$config->delete['10.6'][] = 'module/chat/ext/control/extensions.php';
|
||||
$config->delete['10.6'][] = 'module/common/ext/model/xuanxuan.php';
|
||||
$config->delete['12.4.2'][] = 'www/js/ueditor';
|
||||
|
||||
@@ -911,16 +911,28 @@ class upgradeModel extends model
|
||||
public function deleteFiles()
|
||||
{
|
||||
$result = array();
|
||||
$zfile = $this->app->loadClass('zfile');
|
||||
|
||||
foreach($this->config->delete as $deleteFiles)
|
||||
{
|
||||
$basePath = $this->app->getBasePath();
|
||||
|
||||
foreach($deleteFiles as $file)
|
||||
{
|
||||
if(isset($this->config->excludeFiles[$file])) continue;
|
||||
|
||||
$fullPath = $basePath . str_replace('/', DIRECTORY_SEPARATOR, $file);
|
||||
if(file_exists($fullPath) and !unlink($fullPath)) $result[] = $fullPath;
|
||||
if(file_exists($fullPath))
|
||||
{
|
||||
if((is_dir($fullPath) and !$zfile->removeDir($fullPath)) or
|
||||
(is_file($fullPath) and !$zfile->removeFile($fullPath)))
|
||||
{
|
||||
$result[] = $fullPath;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user