File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 " ,"模块卸载失败! " );
Original file line number Diff line number Diff line change 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 );
Original file line number Diff line number Diff line change 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 " ,"插件卸载失败! " );
Original file line number Diff line number Diff 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 );
Original file line number Diff line number Diff line change 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 );
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 " ,"模板删除失败! " );
You can’t perform that action at this time.
0 commit comments