From d5b9d83778fbdafb29e9323b1da73af045f8f3e8 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Mon, 19 May 2014 10:45:02 -0500
Subject: [PATCH] Add git commit hash to system information page

---
 include/staff/system.inc.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/staff/system.inc.php b/include/staff/system.inc.php
index 6b59f0a08..f1fb08204 100644
--- a/include/staff/system.inc.php
+++ b/include/staff/system.inc.php
@@ -1,6 +1,9 @@
 <?php
 if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin()) die('Access Denied');
 
+$commit = GIT_VERSION != '$git' ? GIT_VERSION : (
+    @shell_exec('git rev-parse HEAD') ?: '?');
+
 ?>
 <h2>About this osTicket Installation</h2>
 <br/>
@@ -10,7 +13,7 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin()) die('Access
 </thead>
 <tbody>
     <tr><td>osTicket Version</td>
-        <td><?php echo THIS_VERSION; ?></td></tr>
+        <td><?php echo sprintf("%s (%s)", THIS_VERSION, $commit); ?></td></tr>
     <tr><td>Server Software</td>
         <td><?php echo $_SERVER['SERVER_SOFTWARE']; ?></td></tr>
     <tr><td>PHP Version</td>
-- 
GitLab