|
|
@ -721,7 +721,7 @@ Class ApiController extends Controller { |
|
|
|
|
|
|
|
|
|
|
|
$themeName = $this->post('theme', ''); |
|
|
|
$themeName = $this->post('theme', ''); |
|
|
|
$contentDirectory = $this->post('contentdir', ''); |
|
|
|
$contentDirectory = $this->post('contentdir', ''); |
|
|
|
$allowedThemes = FSC::$app['config']['allowedThemes']; |
|
|
|
$allowedThemes = array_keys( FSC::$app['config']['allowedThemes'] ); |
|
|
|
if (empty($themeName)) { |
|
|
|
if (empty($themeName)) { |
|
|
|
$err = '参数不能为空!'; |
|
|
|
$err = '参数不能为空!'; |
|
|
|
return $this->renderJson(compact('code', 'msg', 'err', 'data'), $this->httpStatus['notAllowed']); |
|
|
|
return $this->renderJson(compact('code', 'msg', 'err', 'data'), $this->httpStatus['notAllowed']); |
|
|
@ -779,4 +779,26 @@ Class ApiController extends Controller { |
|
|
|
return $this->renderJson(compact('code', 'msg', 'err', 'data')); |
|
|
|
return $this->renderJson(compact('code', 'msg', 'err', 'data')); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//config,获取系统配置信息 |
|
|
|
|
|
|
|
public function actionConfig() { |
|
|
|
|
|
|
|
$code = 0; |
|
|
|
|
|
|
|
$msg = $err = ''; |
|
|
|
|
|
|
|
$data = array(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$configs = FSC::$app['config']; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$data['version'] = $configs['version']; |
|
|
|
|
|
|
|
$data['supportedThemes'] = $configs['allowedThemes']; |
|
|
|
|
|
|
|
$data['currentTheme'] = $configs['theme']; |
|
|
|
|
|
|
|
$data['admin_captcha'] = $configs['admin']['captcha']; |
|
|
|
|
|
|
|
$data['admin_maxUploadFileSize'] = $configs['admin']['maxUploadFileSize'] * 1024*1024; |
|
|
|
|
|
|
|
$data['admin_supportedFileTypes'] = $configs['admin']['allowedUploadFileTypes']; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$code = 1; |
|
|
|
|
|
|
|
$msg = ''; |
|
|
|
|
|
|
|
$err = ''; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $this->renderJson(compact('code', 'msg', 'err', 'data')); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|