Browse Source

update

tags/2.7.1
flucout 3 weeks ago
parent
commit
e304e9acc2
  1. 14
      app/command/CleanViteJs.php
  2. 2
      app/script/convert.sh
  3. BIN
      public/install/src/panel6.zip
  4. BIN
      public/install/update/LinuxPanel-9.1.0.zip
  5. BIN
      public/win/panel/panel_8.2.0.zip
  6. 15
      wiki/files/linux/PluginLoader.py
  7. 2
      wiki/update.md
  8. 2
      wiki/updatewin.md

14
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证书"', '{', '}');

2
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=(

BIN
public/install/src/panel6.zip

BIN
public/install/update/LinuxPanel-9.1.0.zip

BIN
public/win/panel/panel_8.1.0.zip → public/win/panel/panel_8.2.0.zip

15
wiki/files/linux/PluginLoader.py

@ -40,7 +40,6 @@ def plugin_run(plugin_name,def_name,args):
# 添加插件目录到系统路径
public.sys_path_append(plugin_path)
try:
if not is_php:
# 引用插件入口文件
_name = "{}_main".format(plugin_name)
@ -79,12 +78,6 @@ def plugin_run(plugin_name,def_name,args):
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,'指定插件不存在')
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,7 +137,6 @@ 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)
@ -164,11 +156,6 @@ def module_run(module_name,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):

2
wiki/update.md

@ -119,6 +119,8 @@
<script src="/static/bt.js"></script>
```
在 BTPanel/templates/default/software.html 的 <script>window.vite_public_request_token
- [可选]去除创建网站自动创建的垃圾文件:在class/panelSite.py,分别删除
htaccess = self.sitePath + '/.htaccess'

2
wiki/updatewin.md

@ -50,6 +50,8 @@ Windows版宝塔由于加密文件太多,无法全部解密,因此无法做
删除 p = threading.Thread(target=update_software_list) 以及下面2行
- tools.py,删除#尝试删除本地hosts文件中的宝塔域名解析
- 去除面板日志上报:script/site_task.py 文件
- 删除最下面 logs_analysis() 这1行

Loading…
Cancel
Save