This commit is contained in:
caoyanyi
2023-03-01 10:15:17 +08:00
parent a32120f52b
commit f5a93d1166
2 changed files with 20 additions and 1 deletions
+19
View File
@@ -11,6 +11,25 @@
*/
class admin extends control
{
/**
* The gogs constructor.
* @param string $moduleName
* @param string $methodName
*/
public function __construct($moduleName = '', $methodName = '')
{
parent::__construct($moduleName, $methodName);
if(!isset($this->config->global->sn))
{
$this->loadModel('setting');
$this->setting->setItem('system.common.global.sn', $this->setting->computeSN());
if(!isset($this->config->global)) $this->config->global = new stdclass();
$this->config->global->sn = $this->setting->getItem('owner=system&module=common&section=global&key=sn');
}
}
/**
* Index page.
* @access public