mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 04:19:26 +08:00
This commit is contained in:
@@ -377,10 +377,11 @@ class crontab_api:
|
||||
stype = request.form.get('type', '')
|
||||
|
||||
bak_data = []
|
||||
hookPath = mw.getPanelDataDir() + "/hook_backup.json"
|
||||
if os.path.exists(hookPath):
|
||||
t = mw.readFile(hookPath)
|
||||
bak_data = json.loads(t)
|
||||
if stype == 'sites' or stype == 'database' or stype.find('database_') > -1 or stype == 'path':
|
||||
hookPath = mw.getPanelDataDir() + "/hook_backup.json"
|
||||
if os.path.exists(hookPath):
|
||||
t = mw.readFile(hookPath)
|
||||
bak_data = json.loads(t)
|
||||
|
||||
if stype == 'database' or stype.find('database_') > -1:
|
||||
sqlite3_name = 'mysql'
|
||||
@@ -411,10 +412,11 @@ class crontab_api:
|
||||
data = {}
|
||||
data['orderOpt'] = bak_data
|
||||
|
||||
if stype == 'site' or stype == 'logs':
|
||||
stype == 'sites'
|
||||
default_db = 'sites'
|
||||
# if stype == 'site' or stype == 'logs':
|
||||
# stype == 'sites'
|
||||
|
||||
data['data'] = mw.M(stype).field('name,ps').select()
|
||||
data['data'] = mw.M(default_db).field('name,ps').select()
|
||||
return mw.getJson(data)
|
||||
##### ----- start ----- ###
|
||||
|
||||
|
||||
@@ -462,7 +462,7 @@ function toBackup(type){
|
||||
break;
|
||||
case 'logs':
|
||||
sMsg = '切割日志';
|
||||
sType = "sites";
|
||||
sType = "logs";
|
||||
break;
|
||||
case 'path':
|
||||
sMsg = '备份目录';
|
||||
|
||||
Reference in New Issue
Block a user