mirror of
https://github.com/flucont/btcloud.git
synced 2025-02-08 12:38:13 -05:00
update
This commit is contained in:
parent
aba885f434
commit
e304e9acc2
@ -129,13 +129,11 @@ class CleanViteJs extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(strpos($file, '"calc"') !== false && strpos($file, '"checkConfirm"') !== false){ //main2
|
if(strpos($file, '"calc"') !== false && strpos($file, '"checkConfirm"') !== false){ //main2
|
||||||
$file = preg_replace('!,isCalc:\w+,isInput:\w+,isCheck:\w+,!', ',isCalc:!1,isInput:!1,isCheck:!1,', $file);
|
$file = preg_replace('!,isCalc:\w+,isInput:\w+,!', ',isCalc:!1,isInput:!1,', $file);
|
||||||
$file = preg_replace('!\w+\(\(\(\)=>"calc"===\w+\.type\|\|"checkConfirm"===\w+\.type\)\)!', '!1', $file);
|
$file = preg_replace('!"calc"===\w+\.type!', '!1', $file);
|
||||||
$file = preg_replace('!\w+\(\(\(\)=>"input"===\w+\.type\)\)!', '!1', $file);
|
$file = preg_replace('!\w+\(\(\(\)=>"input"===\w+\.type\)\)!', '!1', $file);
|
||||||
$file = preg_replace('!\w+\(\(\(\)=>"check"===\w+\.type\|\|"checkConfirm"===\w+\.type\)\)!', '!1', $file);
|
$file = preg_replace('!"calc"===\w+\.type!', '!1', $file);
|
||||||
$file = preg_replace('!\w+\(\(function\(\)\{return"calc"===\w+\.type\|\|"checkConfirm"===\w+\.type\}\)\)!', '!1', $file);
|
|
||||||
$file = preg_replace('!\w+\(\(function\(\)\{return"input"===\w+\.type\}\)\)!', '!1', $file);
|
$file = preg_replace('!\w+\(\(function\(\)\{return"input"===\w+\.type\}\)\)!', '!1', $file);
|
||||||
$file = preg_replace('!\w+\(\(function\(\)\{return"check"===\w+\.type\|\|"checkConfirm"===\w+\.type\}\)\)!', '!1', $file);
|
|
||||||
$flag = true;
|
$flag = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,13 +150,13 @@ class CleanViteJs extends Command
|
|||||||
$flag = true;
|
$flag = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if(strpos($file, '"bt-waf-gray"')!==false){ //site.popup
|
if(strpos($file, 'svgtofont-left-waf')!==false){ //site.table
|
||||||
$code = $this->getExtendCode($file, '"bt-waf-gray"', 2);
|
$code = $this->getExtendCode($file, 'svgtofont-left-waf');
|
||||||
$code = $this->getExtendCode($file, $code, 1, '[', ']');
|
$code = $this->getExtendCode($file, $code, 1, '[', ']');
|
||||||
$code = $this->getExtendFunction($file, $code);
|
$code = $this->getExtendFunction($file, $code);
|
||||||
$file = str_replace($code, '""', $file);
|
$file = str_replace($code, '""', $file);
|
||||||
$flag = true;
|
$flag = true;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
if(strpos($file, '"商用SSL证书"')!==false){ //site-ssl
|
if(strpos($file, '"商用SSL证书"')!==false){ //site-ssl
|
||||||
$code = $this->getExtendFunction($file, '"商用SSL证书"', '{', '}');
|
$code = $this->getExtendFunction($file, '"商用SSL证书"', '{', '}');
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
Linux_Version="9.1.0"
|
Linux_Version="9.1.0"
|
||||||
Windows_Version="8.1.0"
|
Windows_Version="8.2.0"
|
||||||
Btm_Version="2.3.0"
|
Btm_Version="2.3.0"
|
||||||
|
|
||||||
FILES=(
|
FILES=(
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -40,50 +40,43 @@ def plugin_run(plugin_name,def_name,args):
|
|||||||
# 添加插件目录到系统路径
|
# 添加插件目录到系统路径
|
||||||
public.sys_path_append(plugin_path)
|
public.sys_path_append(plugin_path)
|
||||||
|
|
||||||
try:
|
if not is_php:
|
||||||
if not is_php:
|
# 引用插件入口文件
|
||||||
# 引用插件入口文件
|
_name = "{}_main".format(plugin_name)
|
||||||
_name = "{}_main".format(plugin_name)
|
plugin_main = __import__(_name)
|
||||||
plugin_main = __import__(_name)
|
|
||||||
|
|
||||||
# 检查类名是否符合规范
|
# 检查类名是否符合规范
|
||||||
if not hasattr(plugin_main,_name):
|
if not hasattr(plugin_main,_name):
|
||||||
return public.returnMsg(False,'指定插件入口文件不符合规范')
|
return public.returnMsg(False,'指定插件入口文件不符合规范')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if sys.version_info[0] == 2:
|
if sys.version_info[0] == 2:
|
||||||
reload(plugin_main)
|
reload(plugin_main)
|
||||||
else:
|
else:
|
||||||
from imp import reload
|
from imp import reload
|
||||||
reload(plugin_main)
|
reload(plugin_main)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# 实例化插件类
|
# 实例化插件类
|
||||||
plugin_obj = getattr(plugin_main,_name)()
|
plugin_obj = getattr(plugin_main,_name)()
|
||||||
|
|
||||||
# 检查方法是否存在
|
# 检查方法是否存在
|
||||||
if not hasattr(plugin_obj,def_name):
|
if not hasattr(plugin_obj,def_name):
|
||||||
return public.returnMsg(False,'在[%s]插件中找不到[%s]方法' % (plugin_name,def_name))
|
return public.returnMsg(False,'在[%s]插件中找不到[%s]方法' % (plugin_name,def_name))
|
||||||
|
|
||||||
if 'plugin_get_object' in args and args.plugin_get_object == 1:
|
if 'plugin_get_object' in args and args.plugin_get_object == 1:
|
||||||
return getattr(plugin_obj, def_name)
|
return getattr(plugin_obj, def_name)
|
||||||
|
|
||||||
# 执行方法
|
# 执行方法
|
||||||
return getattr(plugin_obj,def_name)(args)
|
return getattr(plugin_obj,def_name)(args)
|
||||||
else:
|
else:
|
||||||
if 'plugin_get_object' in args and args.plugin_get_object == 1:
|
if 'plugin_get_object' in args and args.plugin_get_object == 1:
|
||||||
return None
|
return None
|
||||||
import panelPHP
|
import panelPHP
|
||||||
args.s = def_name
|
args.s = def_name
|
||||||
args.name = plugin_name
|
args.name = plugin_name
|
||||||
return panelPHP.panelPHP(plugin_name).exec_php_script(args)
|
return panelPHP.panelPHP(plugin_name).exec_php_script(args)
|
||||||
|
|
||||||
except SyntaxError as ex:
|
|
||||||
return public.returnMsg(False,'指定插件不兼容当前操作系统')
|
|
||||||
except Exception as ex:
|
|
||||||
public.print_error()
|
|
||||||
return public.returnMsg(False,'指定插件不存在')
|
|
||||||
|
|
||||||
|
|
||||||
def get_module_list():
|
def get_module_list():
|
||||||
@ -117,7 +110,7 @@ def module_run(module_name,def_name,args):
|
|||||||
if model_index:
|
if model_index:
|
||||||
# 新模块目录
|
# 新模块目录
|
||||||
if model_index in ['mod']:
|
if model_index in ['mod']:
|
||||||
_name = "{}Mod".format(module_name)
|
_name = "{}Mod".format(module_name.split('/')[1])
|
||||||
module_file = os.path.join(panel_path,'mod','project',module_name + 'Mod.py')
|
module_file = os.path.join(panel_path,'mod','project',module_name + 'Mod.py')
|
||||||
elif model_index:
|
elif model_index:
|
||||||
# 旧模块目录
|
# 旧模块目录
|
||||||
@ -144,31 +137,25 @@ def module_run(module_name,def_name,args):
|
|||||||
return public.returnMsg(False,'模块路径不合法')
|
return public.returnMsg(False,'模块路径不合法')
|
||||||
|
|
||||||
public.sys_path_append(os.path.dirname(module_file))
|
public.sys_path_append(os.path.dirname(module_file))
|
||||||
try:
|
# 引用模块入口文件
|
||||||
# 引用模块入口文件
|
module_main = __import__(_name)
|
||||||
module_main = __import__(_name)
|
|
||||||
|
|
||||||
# 检查模块是否符合规范
|
# 检查模块是否符合规范
|
||||||
if not hasattr(module_main,'main'):
|
if not hasattr(module_main,'main'):
|
||||||
return public.returnMsg(False,'指定模块入口文件不符合规范')
|
return public.returnMsg(False,'指定模块入口文件不符合规范')
|
||||||
|
|
||||||
# 实例化模块类
|
# 实例化模块类
|
||||||
module_obj = getattr(module_main,'main')()
|
module_obj = getattr(module_main,'main')()
|
||||||
|
|
||||||
# 检查方法是否存在
|
# 检查方法是否存在
|
||||||
if not hasattr(module_obj,def_name):
|
if not hasattr(module_obj,def_name):
|
||||||
return public.returnMsg(False,'在[%s]模块中找不到[%s]方法' % (module_name,def_name))
|
return public.returnMsg(False,'在[%s]模块中找不到[%s]方法' % (module_name,def_name))
|
||||||
|
|
||||||
if 'module_get_object' in args and args.module_get_object == 1:
|
if 'module_get_object' in args and args.module_get_object == 1:
|
||||||
return getattr(module_obj,def_name)
|
return getattr(module_obj,def_name)
|
||||||
|
|
||||||
# 执行方法
|
# 执行方法
|
||||||
return getattr(module_obj,def_name)(args)
|
return getattr(module_obj,def_name)(args)
|
||||||
except SyntaxError as ex:
|
|
||||||
return public.returnMsg(False,'指定模块不兼容当前操作系统')
|
|
||||||
except Exception as ex:
|
|
||||||
public.print_error()
|
|
||||||
return public.returnMsg(False,'指定模块不存在')
|
|
||||||
|
|
||||||
|
|
||||||
def get_plugin_list(upgrade_force = False):
|
def get_plugin_list(upgrade_force = False):
|
||||||
|
@ -119,6 +119,8 @@
|
|||||||
<script src="/static/bt.js"></script>
|
<script src="/static/bt.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
在 BTPanel/templates/default/software.html 的 <script>window.vite_public_request_token 前面加入
|
||||||
|
|
||||||
- [可选]去除创建网站自动创建的垃圾文件:在class/panelSite.py,分别删除
|
- [可选]去除创建网站自动创建的垃圾文件:在class/panelSite.py,分别删除
|
||||||
|
|
||||||
htaccess = self.sitePath + '/.htaccess'
|
htaccess = self.sitePath + '/.htaccess'
|
||||||
|
@ -50,6 +50,8 @@ Windows版宝塔由于加密文件太多,无法全部解密,因此无法做
|
|||||||
|
|
||||||
删除 p = threading.Thread(target=update_software_list) 以及下面2行
|
删除 p = threading.Thread(target=update_software_list) 以及下面2行
|
||||||
|
|
||||||
|
- tools.py,删除#尝试删除本地hosts文件中的宝塔域名解析
|
||||||
|
|
||||||
- 去除面板日志上报:script/site_task.py 文件
|
- 去除面板日志上报:script/site_task.py 文件
|
||||||
|
|
||||||
- 删除最下面 logs_analysis() 这1行
|
- 删除最下面 logs_analysis() 这1行
|
||||||
|
Loading…
Reference in New Issue
Block a user