* fix bug 841.

This commit is contained in:
wangyidong
2016-06-08 11:36:52 +08:00
parent 932f6f9778
commit c33166261d
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -180,7 +180,7 @@ class searchModel extends model
if($hasUser)
{
$users = $this->loadModel('user')->getPairs();
$users = $this->loadModel('user')->getPairs('realname');
$users['$@me'] = $this->lang->search->me;
}
if($hasProduct) $products = array('' => '') + $this->loadModel('product')->getPairs();
+2 -2
View File
@@ -64,7 +64,7 @@ class userModel extends model
/**
* Get the account=>relaname pairs.
*
* @param string $params noletter|noempty|noclosed|nodeleted|withguest|pofirst|devfirst|qafirst|pmfirst, can be sets of theme
* @param string $params noletter|noempty|noclosed|nodeleted|withguest|pofirst|devfirst|qafirst|pmfirst|realname, can be sets of theme
* @param string $usersToAppended account1,account2
* @access public
* @return array
@@ -98,7 +98,7 @@ class userModel extends model
{
$firstLetter = ucfirst(substr($account, 0, 1)) . ':';
if(strpos($params, 'noletter') !== false) $firstLetter = '';
$users[$account] = $firstLetter . ($user->deleted ? $account : ($user->realname ? $user->realname : $account));
$users[$account] = $firstLetter . (($user->deleted and strpos($params, 'realname') === false) ? $account : ($user->realname ? $user->realname : $account));
}
/* Append empty, closed, and guest users. */