* Fix version search problem.
This commit is contained in:
+5
-13
@@ -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`');
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent">
|
||||
<div class="cell <?php if($type == 'bysearch') echo 'show';?>" id="queryBox" data-module='projectBuild'></div>
|
||||
<div class="cell <?php if($type == 'bysearch') echo 'show';?>" id="queryBox" data-module='executionBuild'></div>
|
||||
<?php if(empty($projectBuilds)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
|
||||
@@ -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')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user