Skip to content

Commit

Permalink
Merge pull request #678 from midoks/dev
Browse files Browse the repository at this point in the history
修复phpmysqladmin插件
  • Loading branch information
midoks authored Jan 3, 2025
2 parents 047d84a + 19964d3 commit a36b0b7
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.
3 changes: 2 additions & 1 deletion plugins/phpmyadmin/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ def getHomePage():


def getPhpVer(expect=55):
v = MwSites.instance().getPhpVersion()
php_vers = MwSites.instance().getPhpVersion()
v = php_vers['data']
is_find = False
for i in range(len(v)):
t = str(v[i]['version'])
Expand Down
2 changes: 2 additions & 0 deletions plugins/phpmyadmin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")

# cd /www/server/mdserver-web && python3 plugins/phpmyadmin/index.py start

if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
fi
Expand Down
3 changes: 2 additions & 1 deletion plugins/phpmyadmin/js/phpmyadmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ function phpVer(version) {
version = _version['data'];
}

$.post('/site/get_php_version', function(rdata) {
$.post('/site/get_php_version', function(data) {
var rdata = data['data'];
// console.log(rdata);
var body = "<div class='ver line'><span class='tname'>PHP版本</span><select id='phpver' class='bt-input-text mr20' name='phpVersion' style='width:110px'>";
var optionSelect = '';
Expand Down
2 changes: 2 additions & 0 deletions plugins/system_safe/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ SYSOS=`uname`
VERSION=$2
APP_NAME=system_safe

# cd /www/server/mdserver-web && python3 plugins/system_safe/system_safe.py stop 1.0

Install_App()
{
echo '正在安装脚本文件...'
Expand Down
8 changes: 4 additions & 4 deletions plugins/tamper_proof_py/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
os.chdir(web_dir)

import core.mw as mw
from utils.site import sites as MwSites

app_debug = False
if mw.isAppleSystem():
Expand Down Expand Up @@ -560,12 +561,11 @@ def sim_test(self):
return mw.returnJson(False, "此目录不存在")

# 判断是否安装php
import site_api
php_version = site_api.site_api().getPhpVersion()
if not php_version:
php_version = MwSites.instance().getPhpVersion()
if not php_version['data']:
return mw.returnJson(False, "未安装PHP测试失败")

php_path = '/www/server/php/' + php_version[1]['version'] + '/bin/php'
php_path = '/www/server/php/' + php_version['data'][1]['version'] + '/bin/php'
php_name = path + "/" + str(int(time.time())) + ".php"
if os.path.exists(php_name):
mw.execShell("rm -rf %s" % php_name)
Expand Down
3 changes: 2 additions & 1 deletion plugins/xhprof/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def getHomePage():


def getPhpVer(expect=74):
v = MwSites.instance().getPhpVersion()
php_vers = MwSites.instance().getPhpVersion()
v = php_vers['data']
for i in range(len(v)):
t = int(v[i]['version'])
if (t >= expect):
Expand Down
1 change: 1 addition & 0 deletions scripts/install/debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ apt install -y libaio1
apt install -y libmecab2

apt install -y dnsutils
apt install -y apache2-utils

P_VER=`python3 -V | awk '{print $2}'`
if version_ge "$P_VER" "3.11.0" ;then
Expand Down

0 comments on commit a36b0b7

Please sign in to comment.