Skip to content

Commit

Permalink
7.0.14-02
Browse files Browse the repository at this point in the history
  • Loading branch information
showpy committed Nov 1, 2019
1 parent 7c4ce34 commit ad38adb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion class/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def init(self):
if ua:
ua = ua.lower();
if ua.find('spider') != -1 or ua.find('bot') != -1: return redirect('https://www.baidu.com');
g.version = '7.0.14'
g.version = '7.0.2'
g.title = public.GetConfigValue('title')
g.uri = request.path
session['version'] = g.version;
Expand Down
5 changes: 3 additions & 2 deletions class/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ def ToBackup(self,get):
backupName = session['config']['backup_path'] + '/database/' + fileName
public.ExecShell("/www/server/mysql/bin/mysqldump --default-character-set="+ public.get_database_character(name) +" --force --opt \"" + name + "\" | gzip > " + backupName)
if not os.path.exists(backupName): return public.returnMsg(False,'BACKUP_ERROR');

if not self.mypass(False, root): return public.returnMsg(False, '数据库配置文件获取失败,请检查MySQL配置文件是否存在')
self.mypass(False, root)

sql = public.M('backup')
addTime = time.strftime('%Y-%m-%d %X',time.localtime())
Expand Down Expand Up @@ -512,6 +512,7 @@ def mypass(self,act,root):
mycnf = mycnf.replace(sea,subStr)
if len(mycnf) > 100: public.writeFile('/etc/my.cnf',mycnf);
return True
return True

#添加到服务器
def ToDataBase(self,find):
Expand Down
2 changes: 1 addition & 1 deletion class/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ def GetFileBody(self,get) :
#保存文件
def SaveFileBody(self,get):
if not 'path' in get: return public.returnMsg(False,'path参数不能为空!')
if not 'data' in get: return public.returnMsg(False,'data参数不能为空!')
#if not 'data' in get: return public.returnMsg(False,'data参数不能为空!')
if sys.version_info[0] == 2: get.path = get.path.encode('utf-8');
if not os.path.exists(get.path):
if get.path.find('.htaccess') == -1:
Expand Down
2 changes: 1 addition & 1 deletion class/panelRedirect.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def SetRedirect(self,get):
}
"""
pathstr = """
rewrite ^%s(.*) %s/%s %s;
rewrite ^%s(.*) %s%s %s;
"""
rconf = "#REWRITE-START"
if get.domainorpath == "domain":
Expand Down

0 comments on commit ad38adb

Please sign in to comment.