diff --git a/app/command/CleanViteJs.php b/app/command/CleanViteJs.php index 001bdd6..0eb3009 100644 --- a/app/command/CleanViteJs.php +++ b/app/command/CleanViteJs.php @@ -129,13 +129,11 @@ class CleanViteJs extends Command } 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('!\w+\(\(\(\)=>"calc"===\w+\.type\|\|"checkConfirm"===\w+\.type\)\)!', '!1', $file); + $file = preg_replace('!,isCalc:\w+,isInput:\w+,!', ',isCalc:!1,isInput:!1,', $file); + $file = preg_replace('!"calc"===\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('!\w+\(\(function\(\)\{return"calc"===\w+\.type\|\|"checkConfirm"===\w+\.type\}\)\)!', '!1', $file); + $file = preg_replace('!"calc"===\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; } @@ -152,13 +150,13 @@ class CleanViteJs extends Command $flag = true; } - /*if(strpos($file, '"bt-waf-gray"')!==false){ //site.popup - $code = $this->getExtendCode($file, '"bt-waf-gray"', 2); + if(strpos($file, 'svgtofont-left-waf')!==false){ //site.table + $code = $this->getExtendCode($file, 'svgtofont-left-waf'); $code = $this->getExtendCode($file, $code, 1, '[', ']'); $code = $this->getExtendFunction($file, $code); $file = str_replace($code, '""', $file); $flag = true; - }*/ + } if(strpos($file, '"商用SSL证书"')!==false){ //site-ssl $code = $this->getExtendFunction($file, '"商用SSL证书"', '{', '}'); diff --git a/app/script/convert.sh b/app/script/convert.sh index 118ef78..a9a8987 100644 --- a/app/script/convert.sh +++ b/app/script/convert.sh @@ -1,7 +1,7 @@ #!/bin/bash Linux_Version="9.1.0" -Windows_Version="8.1.0" +Windows_Version="8.2.0" Btm_Version="2.3.0" FILES=( diff --git a/public/install/src/panel6.zip b/public/install/src/panel6.zip index 1f1b6e8..b14507d 100644 Binary files a/public/install/src/panel6.zip and b/public/install/src/panel6.zip differ diff --git a/public/install/update/LinuxPanel-9.1.0.zip b/public/install/update/LinuxPanel-9.1.0.zip index 43daf74..479c164 100644 Binary files a/public/install/update/LinuxPanel-9.1.0.zip and b/public/install/update/LinuxPanel-9.1.0.zip differ diff --git a/public/win/panel/panel_8.1.0.zip b/public/win/panel/panel_8.2.0.zip similarity index 90% rename from public/win/panel/panel_8.1.0.zip rename to public/win/panel/panel_8.2.0.zip index e49d581..aaa7869 100644 Binary files a/public/win/panel/panel_8.1.0.zip and b/public/win/panel/panel_8.2.0.zip differ diff --git a/wiki/files/linux/PluginLoader.py b/wiki/files/linux/PluginLoader.py index 33cc028..a419661 100644 --- a/wiki/files/linux/PluginLoader.py +++ b/wiki/files/linux/PluginLoader.py @@ -40,50 +40,43 @@ def plugin_run(plugin_name,def_name,args): # 添加插件目录到系统路径 public.sys_path_append(plugin_path) - try: - if not is_php: - # 引用插件入口文件 - _name = "{}_main".format(plugin_name) - plugin_main = __import__(_name) - - # 检查类名是否符合规范 - if not hasattr(plugin_main,_name): - return public.returnMsg(False,'指定插件入口文件不符合规范') - - try: - if sys.version_info[0] == 2: - reload(plugin_main) - else: - from imp import reload - reload(plugin_main) - except: - pass - - # 实例化插件类 - plugin_obj = getattr(plugin_main,_name)() - - # 检查方法是否存在 - if not hasattr(plugin_obj,def_name): - return public.returnMsg(False,'在[%s]插件中找不到[%s]方法' % (plugin_name,def_name)) - - if 'plugin_get_object' in args and args.plugin_get_object == 1: - return getattr(plugin_obj, def_name) - - # 执行方法 - return getattr(plugin_obj,def_name)(args) - else: - if 'plugin_get_object' in args and args.plugin_get_object == 1: - return None - import panelPHP - args.s = def_name - args.name = plugin_name - 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,'指定插件不存在') + if not is_php: + # 引用插件入口文件 + _name = "{}_main".format(plugin_name) + plugin_main = __import__(_name) + + # 检查类名是否符合规范 + if not hasattr(plugin_main,_name): + return public.returnMsg(False,'指定插件入口文件不符合规范') + + try: + if sys.version_info[0] == 2: + reload(plugin_main) + else: + from imp import reload + reload(plugin_main) + except: + pass + + # 实例化插件类 + plugin_obj = getattr(plugin_main,_name)() + + # 检查方法是否存在 + if not hasattr(plugin_obj,def_name): + return public.returnMsg(False,'在[%s]插件中找不到[%s]方法' % (plugin_name,def_name)) + + if 'plugin_get_object' in args and args.plugin_get_object == 1: + return getattr(plugin_obj, def_name) + + # 执行方法 + return getattr(plugin_obj,def_name)(args) + else: + if 'plugin_get_object' in args and args.plugin_get_object == 1: + return None + import panelPHP + args.s = def_name + args.name = plugin_name + return panelPHP.panelPHP(plugin_name).exec_php_script(args) def get_module_list(): @@ -117,7 +110,7 @@ def module_run(module_name,def_name,args): if model_index: # 新模块目录 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') elif model_index: # 旧模块目录 @@ -144,31 +137,25 @@ def module_run(module_name,def_name,args): return public.returnMsg(False,'模块路径不合法') public.sys_path_append(os.path.dirname(module_file)) - try: - # 引用模块入口文件 - module_main = __import__(_name) + # 引用模块入口文件 + module_main = __import__(_name) - # 检查模块是否符合规范 - if not hasattr(module_main,'main'): - return public.returnMsg(False,'指定模块入口文件不符合规范') + # 检查模块是否符合规范 + if not hasattr(module_main,'main'): + return public.returnMsg(False,'指定模块入口文件不符合规范') - # 实例化模块类 - module_obj = getattr(module_main,'main')() + # 实例化模块类 + module_obj = getattr(module_main,'main')() - # 检查方法是否存在 - if not hasattr(module_obj,def_name): - return public.returnMsg(False,'在[%s]模块中找不到[%s]方法' % (module_name,def_name)) - - if 'module_get_object' in args and args.module_get_object == 1: - return getattr(module_obj,def_name) + # 检查方法是否存在 + if not hasattr(module_obj,def_name): + return public.returnMsg(False,'在[%s]模块中找不到[%s]方法' % (module_name,def_name)) + + if 'module_get_object' in args and args.module_get_object == 1: + return getattr(module_obj,def_name) - # 执行方法 - 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,'指定模块不存在') + # 执行方法 + return getattr(module_obj,def_name)(args) def get_plugin_list(upgrade_force = False): diff --git a/wiki/update.md b/wiki/update.md index b8debce..61fee61 100644 --- a/wiki/update.md +++ b/wiki/update.md @@ -119,6 +119,8 @@ ``` + 在 BTPanel/templates/default/software.html 的