diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 2b8604b88b..309e3a9f7c 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -372,6 +372,7 @@ class baseRouter $this->setErrorHandler(); $this->setTimezone(); $this->startSession(); + $this->setProgram2Session(); if($this->config->framework->multiSite) $this->setSiteCode() && $this->loadExtraConfig(); if($this->config->framework->autoConnectDB) $this->connectDB(); @@ -839,6 +840,18 @@ class baseRouter } } + /** + * 从Get里取progarm id 设置到session中 + * Set program id into session. + * + * @access public + * @return void + */ + public function setProgram2Session() + { + if(isset($_GET['pgmID'])) $this->session->set('program', $_GET['pgmID']); //Set program into session. + } + /** * 根据用户浏览器的语言设置和服务器配置,选择显示的语言。 * 优先级:$lang参数 > session > cookie > 浏览器 > 配置文件。