diff --git a/module/common/model.php b/module/common/model.php index 12fbbbbc38..ff8e527144 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -541,7 +541,7 @@ class commonModel extends model * @access public * @return string */ - public static function getRecentProjects() + public static function getRecentExecutions() { global $dbh, $lang, $app; echo '

  • '; @@ -555,16 +555,16 @@ class commonModel extends model return false; } - $recentProjects = $dbh->query('select * from ' . TABLE_PROJECT . " where type in ('stage','sprint') $extraWhere and status != 'close' and deleted = '0' order by id desc limit 6")->fetchAll(); + $executions = $dbh->query('select id,name,code,project from ' . TABLE_PROJECT . " where type in ('stage','sprint') $extraWhere and status != 'closed' and code != '' and deleted = '0' order by id desc limit 6")->fetchAll(); - if(!empty($recentProjects)) + if(!empty($executions)) { - foreach($recentProjects as $key => $project) + foreach($executions as $index => $execution) { - if($key == 5) continue; - echo '
  • ' . html::a(helper::createLink('project', 'task', 'projectID=' . $project->id, '', false, $project->project), $project->name, '', "style='padding: 2px 8px 2px 2px;' class='main-recent-text' title='$project->name'") . '
  • '; + if($index == 5) break; + echo '
  • ' . html::a(helper::createLink('project', 'task', 'projectID=' . $execution->id, '', false, $execution->project), $execution->code, '', "style='padding: 2px 8px 2px 8px;' class='main-recent-text' title='$execution->name'") . '
  • '; } - if(count($recentProjects) > 5) echo '
  • ' . $lang->more . '
  • '; + if(count($executions) > 5) echo '
  • ' . $lang->more . '
  • '; } echo "\n"; diff --git a/module/common/view/header.html.php b/module/common/view/header.html.php index e78040f0e9..d9141bf9d2 100755 --- a/module/common/view/header.html.php +++ b/module/common/view/header.html.php @@ -14,13 +14,13 @@ include 'chosen.html.php';