* Fix bug #25732.
This commit is contained in:
@@ -1687,17 +1687,31 @@ class block extends control
|
||||
*/
|
||||
public function printExecutionBlock()
|
||||
{
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) return;
|
||||
|
||||
$count = isset($this->params->count) ? (int)$this->params->count : 0;
|
||||
$status = isset($this->params->type) ? $this->params->type : 'all';
|
||||
$pager = pager::init(0, $count, 1);
|
||||
|
||||
$this->app->loadLang('execution');
|
||||
$this->app->loadClass('pager', true);
|
||||
$pager = pager::init(0, $count, 1);
|
||||
|
||||
$projectPairs = array();
|
||||
if($this->config->systemMode == 'new') $projectPairs = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('type')->eq('project')->fetchPairs('id', 'name');
|
||||
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->project;
|
||||
$this->view->executionStats = $this->loadModel('project')->getStats($projectID, $status, 0, 0, 30, 'id_asc', $pager);
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->project;
|
||||
$executions = $this->loadModel('project')->getStats($projectID, $status, 0, 0, 30, 'id_asc', $pager);
|
||||
|
||||
foreach($executions as $index => $execution)
|
||||
{
|
||||
if(!empty($execution->children))
|
||||
{
|
||||
foreach($execution->children as $child) $executions[] = $child;
|
||||
unset($executions[$index]);
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->executionStats = $executions;
|
||||
$this->view->projectPairs = $projectPairs;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user