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