Merge pull request #136 from phl0/fixGitID

Check if .git dir exists before accessing it
This commit is contained in:
Florian (DF2ET) 2017-03-27 13:54:57 +02:00 committed by GitHub
commit 5749bafbbd

View file

@ -851,7 +851,11 @@ function decodeAlias($logLine) {
function getGitVersion(){
if (file_exists(".git")) {
exec("git rev-parse HEAD", $output);
return 'GitID #<a href="https://github.com/dg9vh/MMDVMHost-Dashboard/commit/'.substr($output[0],0,7).'">'.substr($output[0],0,7).'</a>';
} else {
return 'GitID unknown';
}
}
?>