diff --git a/module/project/control.php b/module/project/control.php index bac73aeb53..82c02e3ded 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1643,7 +1643,7 @@ class project extends control /* Build the search form. */ $actionURL = $this->createLink('project', 'linkStory', "projectID=$projectID&browseType=bySearch&queryID=myQueryID"); $branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), 'noempty'); - $this->project->buildStorySearchForm($products, $branchGroups, $modules, $queryID, $actionURL); + $this->project->buildStorySearchForm($products, $branchGroups, $modules, $queryID, $actionURL, 'linkStory'); if($browseType == 'bySearch') { diff --git a/module/project/model.php b/module/project/model.php index ca1101d038..7cde5a6536 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -981,9 +981,10 @@ class projectModel extends model */ public function buildStorySearchForm($products, $branchGroups, $modules, $queryID, $actionURL, $type = 'projectStory') { - $branchPairs = array(); - $productType = 'normal'; - $productNum = count($products); + $branchPairs = array(); + $productType = 'normal'; + $productNum = count($products); + $productPairs = array(0 => ''); foreach($products as $product) { $productPairs[$product->id] = $product->name; diff --git a/module/search/model.php b/module/search/model.php index 87bd3019aa..fd22b3b8f4 100644 --- a/module/search/model.php +++ b/module/search/model.php @@ -61,7 +61,8 @@ class searchModel extends model $valueName = "value$i"; /* Skip empty values. */ - if($this->post->$valueName == false and $this->post->$valueName !== '0') continue; + if($this->post->$fieldName == 'activatedCount' and $this->post->$valueName == '0') $this->post->$valueName = 'ZERO'; + if($this->post->$valueName == false) continue; if($this->post->$valueName == 'null') $this->post->$valueName = ''; // Null is special, stands to empty. if($this->post->$valueName == 'ZERO') $this->post->$valueName = 0; // ZERO is special, stands to 0.