diff --git a/classes/System.php b/classes/System.php index 64f070d..a9d0b1b 100644 --- a/classes/System.php +++ b/classes/System.php @@ -4,6 +4,13 @@ namespace ICEcoder; class System { + /** + * @param $name + */ + public function functionEnabled($name) { + return is_callable($name) && false === stripos(ini_get('disable_functions'), $name); + } + /** * @param $path */ diff --git a/editor.php b/editor.php index e48d3d3..796d465 100644 --- a/editor.php +++ b/editor.php @@ -162,11 +162,11 @@ h2 {color: rgba(0,198,255,0.7)} functionEnabled("shell_exec") && is_dir(dirname(__FILE__) . "/.git")) { + $gitCommit = trim(shell_exec('git log --pretty="%h" -n1 HEAD')); $gitCommitTextLink = ' (Git commit: ' . $gitCommit . ')'; } - echo "v" . $ICEcoder["versionNo"] . $gitCommitTextLink; + echo $ICEcoder["versionNo"] . $gitCommitTextLink; ?>