Skip to content

Commit

Permalink
Show git version on setup page
Browse files Browse the repository at this point in the history
  • Loading branch information
digininja committed Jan 30, 2025
1 parent 480da9f commit 40bc75b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@
$database_type_name = "PostgreSQL";
}

$git_ref = "Unknown";

if (PHP_OS == "Linux") {
if (is_dir (".git")) {
$git_ref = shell_exec('cat .git/`cat .git/HEAD | sed "s/.* \(.*\)/\1/"`');
}
}

$phpVersionWarning = "";

if (version_compare(phpversion(), '6', '<')) {
Expand All @@ -68,6 +76,8 @@
{$SERVER_NAME}<br />
<br />
{$DVWAOS}<br />
<br>
Git reference: <em>{$git_ref}</em><br>
<br />
PHP version: <em>" . phpversion() . "</em><br />
{$phpVersionWarning}
Expand Down

0 comments on commit 40bc75b

Please sign in to comment.