diff --git a/module/build/model.php b/module/build/model.php
index 537280924c..2020af74d5 100644
--- a/module/build/model.php
+++ b/module/build/model.php
@@ -199,23 +199,15 @@ class buildModel extends model
/* If there are saved query conditions, reset the session. */
if((int)$queryID)
{
- $buildQuery = $this->loadModel('search')->getQuery($queryID);
- if($buildQuery)
+ $query = $this->loadModel('search')->getQuery($queryID);
+ if($query)
{
- $this->session->set('projectBuildQuery', $buildQuery->sql);
- $this->session->set('projectBuildForm', $buildQuery->form);
+ $this->session->set('executionBuildQuery', $query->sql);
+ $this->session->set('executionBuildForm', $query->form);
}
- else
- {
- $this->session->set('projectBuildQuery', ' 1 = 1');
- }
- }
- else
- {
- if($this->session->projectBuildQuery == false) $this->session->set('projectBuildQuery', ' 1 = 1');
}
- $buildQuery = $this->session->projectBuildQuery;
+ $buildQuery = $this->session->executionBuildQuery;
/* Distinguish between repeated fields. */
$fields = array('id' => '`id`', 'name' => '`name`', 'product' => '`product`', 'desc' => '`desc`');
diff --git a/module/project/control.php b/module/project/control.php
index b95d732d7b..13ecbe4428 100644
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -885,7 +885,7 @@ class project extends control
$type = strtolower($type);
$queryID = ($type == 'bysearch') ? (int)$param : 0;
$actionURL = $this->createLink('project', 'build', "projectID=$projectID&type=bysearch&queryID=myQueryID");
- $this->project->buildProjectBuildSearchForm($products, $queryID, $actionURL);
+ $this->project->buildProjectBuildSearchForm($products, $queryID, $actionURL, 'execution');
/* Get builds. */
if($type == 'bysearch')
diff --git a/module/project/model.php b/module/project/model.php
index 8036474708..2482f93fac 100644
--- a/module/project/model.php
+++ b/module/project/model.php
@@ -2958,15 +2958,17 @@ class projectModel extends model
* @param array $products
* @param int $queryID
* @param string $actionURL
+ * @param string $type execution|project
* @access public
* @return void
*/
- public function buildProjectBuildSearchForm($products, $queryID, $actionURL)
+ public function buildProjectBuildSearchForm($products, $queryID, $actionURL, $type = 'execution')
{
$this->loadModel('build');
/* Set search param. */
- $this->config->build->search['module'] = 'projectBuild';
+ if($type == 'execution') $this->config->build->search['module'] = 'executionBuild';
+ if($type == 'project') $this->config->build->search['module'] = 'projectBuild';
$this->config->build->search['actionURL'] = $actionURL;
$this->config->build->search['queryID'] = $queryID;
$this->config->build->search['params']['product']['values'] = $products;
diff --git a/module/project/view/build.html.php b/module/project/view/build.html.php
index f62eca6e14..1d81cd9981 100644
--- a/module/project/view/build.html.php
+++ b/module/project/view/build.html.php
@@ -33,7 +33,7 @@
-
+
diff --git a/module/projectbuild/control.php b/module/projectbuild/control.php
index f5087672be..1a7f717313 100644
--- a/module/projectbuild/control.php
+++ b/module/projectbuild/control.php
@@ -38,7 +38,7 @@ class projectBuild extends control
$this->config->build->search['fields']['project'] = $this->project->lang->projectCommon;
$this->config->build->search['params']['project'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $projects);
- $this->project->buildProjectBuildSearchForm($products, $queryID, $actionURL);
+ $this->project->buildProjectBuildSearchForm($products, $queryID, $actionURL, 'project');
if($type == 'bysearch')
{