diff --git a/config/config.php b/config/config.php index 53923cebbd..795bceb9c9 100644 --- a/config/config.php +++ b/config/config.php @@ -22,6 +22,7 @@ $config->cookieLife = time() + 2592000; // Cookie的生存时间。The co $config->timezone = 'Asia/Shanghai'; // 时区设置。 The time zone setting, for more see http://www.php.net/manual/en/timezones.php. $config->webRoot = ''; // URL根目录。 The root path of the url. $config->customSession = false; // 是否开启自定义session的存储路径。Whether custom the session save path. +$config->edition = 'open'; // 设置系统的edition,可选值:open|biz|max。Set edition, optional: open|biz|max. /* 框架路由相关设置。Routing settings. */ $config->requestType = 'PATH_INFO'; // 请求类型:PATH_INFO|PATHINFO2|GET。 The request type: PATH_INFO|PATH_INFO2|GET. diff --git a/framework/base/router.class.php b/framework/base/router.class.php index e5ed0362ca..8aea28586f 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -677,6 +677,8 @@ class baseRouter */ public function setEdition() { + if(isset($this->config->edition)) return $this->config->edition; + $edition = substr($this->config->version, 0, 3); if(in_array($edition, array('pro', 'biz', 'max'))) return $this->config->edition = $edition; $this->config->edition = 'open';