From 567ad71e8258378adc2d4fa049c90748b8b13911 Mon Sep 17 00:00:00 2001 From: devzorg Date: Fri, 16 May 2014 22:10:47 +0400 Subject: [PATCH] Adding / SVG support build status --- PHPCI/Controller/BuildStatusController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PHPCI/Controller/BuildStatusController.php b/PHPCI/Controller/BuildStatusController.php index 9c2db5ab..f7304413 100644 --- a/PHPCI/Controller/BuildStatusController.php +++ b/PHPCI/Controller/BuildStatusController.php @@ -42,7 +42,7 @@ class BuildStatusController extends \PHPCI\Controller * @param $projectId * @return string */ - protected function _getStatus($projectId) + protected function getStatus($projectId) { $branch = $this->getParam('branch', 'master'); try { @@ -72,7 +72,7 @@ class BuildStatusController extends \PHPCI\Controller */ public function image($projectId) { - $status = $this->_getStatus($projectId); + $status = $this->getStatus($projectId); header('Content-Type: image/png'); die(file_get_contents(APPLICATION_PATH . 'public/assets/img/build-' . $status . '.png')); } @@ -82,7 +82,7 @@ class BuildStatusController extends \PHPCI\Controller */ public function svg($projectId) { - $status = $this->_getStatus($projectId); + $status = $this->getStatus($projectId); header('Content-Type: image/svg+xml'); die(file_get_contents(APPLICATION_PATH . 'public/assets/img/build-' . $status . '.svg')); }