* fix bug.

This commit is contained in:
wangyidong
2022-04-27 10:33:03 +08:00
parent 9508d7729b
commit 2d82ad3e79
+7 -3
View File
@@ -218,10 +218,14 @@ class router extends baseRouter
/* Get user preference. */
$account = isset($this->session->user->account) ? $this->session->user->account : '';
$sql = new sql();
$account = $sql->quote($account);
$userSetting = array();
if($this->dbh and !empty($this->config->db->name)) $userSetting = $this->dbh->query('SELECT `key`, value FROM' . TABLE_CONFIG . "WHERE `owner`= $account AND `module`='common' and `key` in ('programLink', 'productLink', 'projectLink', 'executionLink', 'URSR')")->fetchAll();
if($this->dbh and !empty($this->config->db->name) and $account)
{
$sql = new sql();
$account = $sql->quote($account);
$userSetting = $this->dbh->query('SELECT `key`, value FROM' . TABLE_CONFIG . "WHERE `owner`= $account AND `module`='common' and `key` in ('programLink', 'productLink', 'projectLink', 'executionLink', 'URSR')")->fetchAll();
}
foreach($userSetting as $setting)
{
if($setting->key == 'URSR') $config->URSR = $setting->value;