diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-11-19 10:25:34 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-11-19 10:25:34 +0300 |
commit | 368c1ac269b43c5324bb1ef2da1f3604e2a716cd (patch) | |
tree | 91951fca9153c6d37d1609806b20d6324fe3d804 /core | |
parent | eb8ecc396d60bc3b83994fe6efcb6cd42668c795 (diff) |
Fixes #6695 show git:pull command whenever piwik is deployed from git (push and commit commands are still shown in development mode only)
Diffstat (limited to 'core')
-rw-r--r-- | core/SettingsPiwik.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/SettingsPiwik.php b/core/SettingsPiwik.php index 26949c560a..23780a0701 100644 --- a/core/SettingsPiwik.php +++ b/core/SettingsPiwik.php @@ -336,6 +336,17 @@ class SettingsPiwik } } + /** + * Returns true if Piwik is deployed using git + * FAQ: http://piwik.org/faq/how-to-install/faq_18271/ + * + * @return bool + */ + public static function isGitDeployment() + { + return file_exists(PIWIK_INCLUDE_PATH . '/.git/HEAD'); + } + public static function getCurrentGitBranch() { $file = PIWIK_INCLUDE_PATH . '/.git/HEAD'; @@ -422,4 +433,5 @@ class SettingsPiwik { return Config::getInstance()->General['force_ssl'] == 1; } + } |