* code for bug #19303.

This commit is contained in:
wangyidong
2022-04-27 09:37:01 +08:00
parent 988b796ed5
commit 899c123dac
3 changed files with 7 additions and 5 deletions
+3 -1
View File
@@ -218,8 +218,10 @@ 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)) $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;