public function isEnabled() { return SettingsPiwik::isGitDeployment(); }
private function getCurrentGitHash() { // we should not use 'git' executable unless we are in a git clone if (!SettingsPiwik::isGitDeployment()) { return 'WARN: it does not look like a Piwik repository clone - you must setup Piwik from git to proceed'; } return trim(`git rev-parse HEAD`); }
public function isEnabled() { return Development::isEnabled() && SettingsPiwik::isGitDeployment(); }
private function getCurrentGitHash() { // we should not use 'git' executable unless we are in a git clone if (!SettingsPiwik::isGitDeployment()) { return 'WARN: it does not look like a Piwik repository clone - you must setup Piwik from git to proceed'; } $gitCmd = 'git -C ' . escapeshellarg(PIWIK_INCLUDE_PATH) . ' rev-parse HEAD'; return trim(shell_exec($gitCmd)); }