use $git_path to determine if it is a git install
This commit is contained in:
parent
7b9038fc0b
commit
47d8040fed
|
|
@ -86,6 +86,7 @@ $document['title'] = $text['title-sys-status'];
|
|||
echo "</tr>\n";
|
||||
|
||||
$git_path = normalize_path_to_os($_SERVER["DOCUMENT_ROOT"]."/.git");
|
||||
if(file_exists($git_path)){
|
||||
$git_branch = shell_exec('git --git-dir='.$git_path.' name-rev --name-only HEAD');
|
||||
rtrim($git_branch);
|
||||
$git_commit = shell_exec('git --git-dir='.$git_path.' rev-parse HEAD');
|
||||
|
|
@ -102,6 +103,7 @@ $document['title'] = $text['title-sys-status'];
|
|||
echo " ".$text['label-git_origin']." ".$git_origin."<br>\n";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo "<!--\n";
|
||||
$tmp_result = shell_exec('uname -a');
|
||||
|
|
|
|||
Loading…
Reference in New Issue