* add system mode for config.

This commit is contained in:
王怡栋
2021-12-03 09:54:28 +08:00
parent 3c276c75f5
commit caab069444
3 changed files with 9 additions and 4 deletions

View File

@@ -36,6 +36,9 @@ class configEntry extends baseEntry
case 'timezone':
$config['value'] = $this->config->timezone;
break;
case 'systemMode':
$config['value'] = $this->config->systemMode;
break;
default:
$this->sendError(400, 'No configuration.');
return;

View File

@@ -21,10 +21,11 @@ class configsEntry extends baseEntry
{
$configs = array();
$configs[] = array('key' => 'language', 'value' => $this->config->default->lang);
$configs[] = array('key' => 'version', 'value' => $this->config->version);
$configs[] = array('key' => 'charset', 'value' => $this->config->charset);
$configs[] = array('key' => 'timezone', 'value' => $this->config->timezone);
$configs[] = array('key' => 'language', 'value' => $this->config->default->lang);
$configs[] = array('key' => 'version', 'value' => $this->config->version);
$configs[] = array('key' => 'charset', 'value' => $this->config->charset);
$configs[] = array('key' => 'timezone', 'value' => $this->config->timezone);
$configs[] = array('key' => 'systemMode', 'value' => $this->config->systemMode);
$this->send(200, $configs);
}

View File

@@ -2118,6 +2118,7 @@ class baseRouter
$view->methodVar = $this->config->methodVar;
$view->viewVar = $this->config->viewVar;
$view->sessionVar = $this->config->sessionVar;
$view->systemMode = $this->config->systemMode;
$this->session->set('random', mt_rand(0, 10000));
$view->sessionName = session_name();