* code for task#949.

This commit is contained in:
zhujinyong
2012-12-14 03:14:56 +00:00
parent e3f0659ea7
commit 152b5921b2
3 changed files with 8 additions and 1 deletions
+6 -1
View File
@@ -72,6 +72,7 @@ class searchModel extends model
/* Set operator. */
$value = $this->post->$valueName;
$operator = $this->post->$operatorName;
if($value == '@me') $value = $this->app->user->account;
if(!isset($this->lang->search->operators[$operator])) $operator = '=';
if($operator == "include")
{
@@ -172,7 +173,11 @@ class searchModel extends model
if($params[$fieldName]['values'] == 'projects') $hasProject = true;
}
if($hasUser) $users = $this->loadModel('user')->getPairs();
if($hasUser)
{
$users = $this->loadModel('user')->getPairs();
$users['@me'] = $this->lang->search->me;
}
if($hasProduct) $products = array('' => '') + $this->loadModel('product')->getPairs();
if($hasProject) $projects = array('' => '') + $this->loadModel('project')->getPairs();