Skip to content

Commit 7842bcb

Browse files
committed
update 260218
1 parent a023e7e commit 7842bcb

5 files changed

Lines changed: 18 additions & 5 deletions

File tree

app/modules/ut-module/admin/index.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,16 @@
2424
endforeach;
2525
if($uninstallsql=='0'):
2626
UTInc::DelDir(APP_ROOT."/modules/".$mid);
27-
UTInc::DelDir(OPEN_ROOT."/assets/modules/".$mid);
27+
if(is_dir(OPEN_ROOT."/assets/modules/".$mid)):
28+
UTInc::DelDir(OPEN_ROOT."/assets/modules/".$mid);
29+
endif;
2830
UTInc::GoUrl("?m=ut-module","成功卸载模块!");
2931
else:
3032
if(UTData::RunSql($uninstallsql)):
3133
UTInc::DelDir(APP_ROOT."/modules/".$mid);
32-
UTInc::DelDir(OPEN_ROOT."/assets/modules/".$mid);
34+
if(is_dir(OPEN_ROOT."/assets/modules/".$mid)):
35+
UTInc::DelDir(OPEN_ROOT."/assets/modules/".$mid);
36+
endif;
3337
UTInc::GoUrl("?m=ut-module","成功卸载模块!");
3438
else:
3539
UTInc::GoUrl("-1","模块卸载失败!");

app/modules/ut-module/admin/module.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
UTInc::MakeDir($assets_dir);
5151
endif;
5252
UTInc::MoveDir(APP_ROOT."/modules/".$mid."/assets",$assets_dir);
53+
UTInc::DelDir(APP_ROOT."/modules/".$mid."/assets");
5354
endif;
5455
$modconfig=APP_ROOT."/modules/".$mid."/usualtool.config";
5556
$mods=file_get_contents($modconfig);

app/modules/ut-plugin/admin/index.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,16 @@
1818
UTData::DelData("cms_plugin","pid='$pid'");
1919
if($uninstallsql=='0'):
2020
UTInc::DelDir(APP_ROOT."/plugins/".$pid);
21-
UTInc::DelDir(OPEN_ROOT."/assets/plugins/".$pid);
21+
if(is_dir(OPEN_ROOT."/assets/plugins/".$pid)):
22+
UTInc::DelDir(OPEN_ROOT."/assets/plugins/".$pid);
23+
endif;
2224
UTInc::GoUrl("?m=ut-plugin","成功卸载插件!");
2325
else:
2426
if(UTData::RunSql($uninstallsql)):
2527
UTInc::DelDir(APP_ROOT."/plugins/".$pid);
26-
UTInc::DelDir(OPEN_ROOT."/assets/plugins/".$pid);
28+
if(is_dir(OPEN_ROOT."/assets/plugins/".$pid)):
29+
UTInc::DelDir(OPEN_ROOT."/assets/plugins/".$pid);
30+
endif;
2731
UTInc::GoUrl("?m=ut-plugin","成功卸载插件!");
2832
else:
2933
UTInc::GoUrl("-1","插件卸载失败!");

app/modules/ut-plugin/admin/plugin.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ function plugin($data){
5858
UTInc::MakeDir($assets_dir);
5959
endif;
6060
UTInc::MoveDir(APP_ROOT."/plugins/".$pid."/assets",$assets_dir);
61+
UTInc::DelDir(APP_ROOT."/plugins/".$pid."/assets");
6162
endif;
6263
$pconfig=APP_ROOT."/plugins/".$pid."/usualtool.config";
6364
$plugins=file_get_contents($pconfig);

app/modules/ut-template/admin/template.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
UTInc::MakeDir($assets_dir);
6262
endif;
6363
UTInc::MoveDir(APP_ROOT."/template/".$tid."/assets",$assets_dir);
64+
UTInc::DelDir(APP_ROOT."/template/".$tid."/assets");
6465
endif;
6566
$id=UTInc::StrSubstr("<id>","</id>",$template);
6667
$type=UTInc::StrSubstr("<type>","</type>",$template);
@@ -89,7 +90,9 @@
8990
$tid=str_replace(".","",UTInc::SqlCheck($_GET["tid"]));
9091
if(UTData::DelData("cms_template","tid='$tid'")){
9192
UTInc::DelDir(APP_ROOT."/template/".$tid);
92-
UTInc::DelDir(OPEN_ROOT."/assets/template/".$tid);
93+
if(is_dir(OPEN_ROOT."/assets/template/".$tid)):
94+
UTInc::DelDir(OPEN_ROOT."/assets/template/".$tid);
95+
endif;
9396
UTInc::GoUrl("?m=ut-template&p=template","模板删除成功!");
9497
}else{
9598
UTInc::GoUrl("-1","模板删除失败!");

0 commit comments

Comments
 (0)