From fd65b4ac28f2051017a5fd991fa6ce046f81d459 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 1 Apr 2021 14:52:02 +0800 Subject: [PATCH] * fix bug #11115 --- framework/router.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/framework/router.class.php b/framework/router.class.php index d04fb6d4a3..36d4fce41e 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -244,7 +244,8 @@ class router extends baseRouter if($this->dbh and !empty($this->config->db->name) and !defined('IN_UPGRADE')) { /* Get story concept in project and product. */ - $URSRList = $this->dbh->query('SELECT `key`, `value` FROM' . TABLE_LANG . "WHERE module = 'custom' and section = 'URSRList' and `key` = \"{$config->URSR}\"")->fetchAll(); + $URSRList = $this->dbh->query('SELECT `key`, `value` FROM' . TABLE_LANG . "WHERE module = 'custom' and section = 'URSRList' and `key` = \"{$this->clientLang}\"")->fetchAll(); + if(empty($URSRList)) $URSRList = $this->dbh->query('SELECT `key`, `value` FROM' . TABLE_LANG . "WHERE module = 'custom' and section = 'URSRList' and `key` = \"{$config->URSR}\"")->fetchAll(); /* Get UR pairs and SR pairs. */ $URPairs = array(); @@ -257,8 +258,8 @@ class router extends baseRouter } /* Set default story concept and init UR and SR concept. */ - $lang->URCommon = zget($URPairs, $config->URSR); - $lang->SRCommon = zget($SRPairs, $config->URSR); + $lang->URCommon = isset($URPairs[$config->URSR]) ? $URPairs[$config->URSR] : reset($URPairs); + $lang->SRCommon = isset($SRPairs[$config->URSR]) ? $URPairs[$config->URSR] : reset($SRPairs); } }