From 54ab93373ddd44b5f53a3ee987a9578f39bb5fd2 Mon Sep 17 00:00:00 2001 From: Dan Cryer Date: Thu, 12 Feb 2015 13:17:42 +0000 Subject: [PATCH] Fixing some bugs related to the last round of changes. --- PHPCI/Controller/ProjectController.php | 1 + PHPCI/View/Home/index.phtml | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/PHPCI/Controller/ProjectController.php b/PHPCI/Controller/ProjectController.php index 5a914adf..e1aaa6cb 100644 --- a/PHPCI/Controller/ProjectController.php +++ b/PHPCI/Controller/ProjectController.php @@ -147,6 +147,7 @@ class ProjectController extends \PHPCI\Controller $branch = $this->getParam('branch', ''); $builds = $this->getLatestBuildsHtml($projectId, urldecode($branch)); + $this->response->disableLayout(); $this->response->setContent($builds[0]); return $this->response; } diff --git a/PHPCI/View/Home/index.phtml b/PHPCI/View/Home/index.phtml index 6e27bb79..251bb9ee 100644 --- a/PHPCI/View/Home/index.phtml +++ b/PHPCI/View/Home/index.phtml @@ -17,7 +17,6 @@ getStatus()) { case \PHPCI\Model\Build::STATUS_NEW: $updated = $build->getCreated(); @@ -44,6 +43,10 @@ break; } + if (!$updated) { + $updated = $build->getCreated(); + } + if ($updated->format('Y-m-d') != $last->format('Y-m-d')): $last = $updated; ?>