From 6516f3cff3e6b8f1d68a6098189021bc05742541 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 28 Nov 2016 15:49:55 -0800 Subject: [PATCH] Issue #2076 - Display last git update info to developers. --- .../shortcodes/batch/admin_shortcodes.php | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/e107_core/shortcodes/batch/admin_shortcodes.php b/e107_core/shortcodes/batch/admin_shortcodes.php index 223ddb4fd..0753695b9 100644 --- a/e107_core/shortcodes/batch/admin_shortcodes.php +++ b/e107_core/shortcodes/batch/admin_shortcodes.php @@ -1054,7 +1054,11 @@ class admin_shortcodes ".FOOTLAN_8."
".$install_date." -

+
"; + + $text .= $this->getLastGitUpdate(); + + $text .= "
".FOOTLAN_9."
". preg_replace("/PHP.*/i", "", $_SERVER['SERVER_SOFTWARE'])."
(".FOOTLAN_10.": ".$_SERVER['SERVER_NAME'].") @@ -1084,6 +1088,22 @@ class admin_shortcodes } } + private function getLastGitUpdate() + { + $gitFetch = e_BASE.'.git/FETCH_HEAD'; + + if(file_exists($gitFetch)) + { + $unix = filemtime($gitFetch); + + $text = "
Last Git Update
"; // NO LAN required. Developer-Only + $text.= ($unix) ? date('r',$unix) : "Never"; + $text .= "
"; + return $text; + } + + } + function sc_admin_status($parm) { if(($parm == 'infopanel' || $parm == 'flexpanel') && e_PAGE != 'admin.php')