php卸载优化
This commit is contained in:
parent
61bd4f799b
commit
a4d75bfc04
|
|
@ -569,11 +569,12 @@ def uninstallLib(version):
|
|||
execstr = "cd " + getPluginDir() + '/versions/' + version + " && /bin/bash " + \
|
||||
name + '.sh' + ' uninstall ' + version
|
||||
|
||||
rettime = time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
insert_info = (None, '安装[' + name + '-' + version + ']',
|
||||
'execshell', '0', rettime, execstr)
|
||||
public.M('tasks').add('id,name,type,status,addtime,execstr', insert_info)
|
||||
return public.returnJson(True, '已将卸载载任务添加到队列!')
|
||||
data = public.execShell(execstr)
|
||||
if data[1] == '':
|
||||
return public.returnJson(True, '已经卸载成功!')
|
||||
else:
|
||||
return public.returnJson(False, '卸载出现错误信息!' + data[1])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
|
|
|
|||
|
|
@ -508,9 +508,12 @@ function installPHPLib(version, name, title, pathinfo) {
|
|||
|
||||
phpPost('install_lib', version, data, function(data){
|
||||
var rdata = $.parseJSON(data.data);
|
||||
layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 });
|
||||
getTaskCount();
|
||||
phpLibConfig(version);
|
||||
// layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 });
|
||||
showMsg(rdata.msg, function(){
|
||||
getTaskCount();
|
||||
phpLibConfig(version);
|
||||
},{ icon: rdata.status ? 1 : 2 });
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
@ -522,9 +525,12 @@ function uninstallPHPLib(version, name, title, pathinfo) {
|
|||
var data = 'name=' + name + '&version=' + version;
|
||||
phpPost('uninstall_lib', version, data, function(data){
|
||||
var rdata = $.parseJSON(data.data);
|
||||
layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 });
|
||||
getTaskCount();
|
||||
phpLibConfig(version);
|
||||
// layer.msg(rdata.msg, { icon: rdata.status ? 1 : 2 });
|
||||
showMsg(rdata.msg, function(){
|
||||
getTaskCount();
|
||||
phpLibConfig(version);
|
||||
},{ icon: rdata.status ? 1 : 2 });
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
Loading…
Reference in New Issue