From 23208b79bf25f2c0ce065953c62f155c3b96ad7e Mon Sep 17 00:00:00 2001 From: mattab Date: Mon, 18 Nov 2013 23:52:47 +1300 Subject: Error messages friendly to CLI output (no html, spaces displayed correctly...). Factoring out class CronArchive from archive.php. --- core/Profiler.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'core/Profiler.php') diff --git a/core/Profiler.php b/core/Profiler.php index ec48788471..731a194fc5 100644 --- a/core/Profiler.php +++ b/core/Profiler.php @@ -201,7 +201,7 @@ class Profiler require_once $path; - $currentGitBranch = self::getCurrentGitBranch(); + $currentGitBranch = SettingsPiwik::getCurrentGitBranch(); $profilerNamespace = "piwik"; if($currentGitBranch != 'master') { $profilerNamespace .= "." . $currentGitBranch; @@ -260,15 +260,6 @@ class Profiler return $array; } - private static function getCurrentGitBranch() - { - $firstLineOfGitHead = file(PIWIK_INCLUDE_PATH . '/.git/HEAD'); - $firstLineOfGitHead = $firstLineOfGitHead[0]; - $parts = explode("/", $firstLineOfGitHead); - $currentGitBranch = trim($parts[2]); - return $currentGitBranch; - } - /** * @return string */ -- cgit v1.2.3