* 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

View File

@@ -26,6 +26,7 @@ $lang->search->setQueryTitle = 'Please input the titleexecute searching befor
$lang->search->storyTitle = 'Story title';
$lang->search->taskTitle = 'Task title';
$lang->search->select = 'Stories/Tasks filter';
$lang->search->me = 'Me';
$lang->search->operators['='] = '=';
$lang->search->operators['!='] = '!=';

View File

@@ -26,6 +26,7 @@ $lang->search->setQueryTitle = '请输入查询标题(保存之前请先查询
$lang->search->storyTitle = '需求名称';
$lang->search->taskTitle = '任务名称';
$lang->search->select = '需求/任务筛选';
$lang->search->me = '自己';
$lang->search->operators['='] = '=';
$lang->search->operators['!='] = '!=';

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();