From 8a68552445fd154b016ebc0a787146f39ef3c7bc Mon Sep 17 00:00:00 2001 From: George Smart Date: Mon, 13 Mar 2017 19:47:20 +0000 Subject: [PATCH 1/2] Added GitID from MMDVMHost to Dashboard This code should include a hyperlink to the GitID for MMDVMHost where the host version supports it. See corresponding PR: https://github.com/g4klx/MMDVMHost/commit/8073ff9a30278394b74208fc6b39829ce12a4972 --- include/functions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/functions.php b/include/functions.php index a81bc6c..2f4851c 100644 --- a/include/functions.php +++ b/include/functions.php @@ -9,7 +9,11 @@ function getMMDVMHostVersion() { return getMMDVMHostFileVersion(); } else { showLapTime("getMMDVMHostVersion"); - return substr($output[0],18,8)." (compiled ".getMMDVMHostFileVersion().")"; + if (!startsWith(substr($output[0],31,8),"#")) { + return substr($output[0],18,8)." (compiled ".getMMDVMHostFileVersion().")"; + } else { + return substr($output[0],18,8)." (compiled ".getMMDVMHostFileVersion().", GitID #".substr($output[0],32,7).")"; + } } } From 960244b1ba3550518e22cfc2942204befe012526 Mon Sep 17 00:00:00 2001 From: George Smart Date: Mon, 13 Mar 2017 20:04:38 +0000 Subject: [PATCH 2/2] Add GitID to the Dashboard with hyperlink to code changes. Checks to see if MMDVMHost version output contains GitID (is longer than previous version). If so, break on the GitID, and insert a hyperlink to the code inside the compile date bracket. --- include/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/functions.php b/include/functions.php index 2f4851c..20586ce 100644 --- a/include/functions.php +++ b/include/functions.php @@ -9,10 +9,10 @@ function getMMDVMHostVersion() { return getMMDVMHostFileVersion(); } else { showLapTime("getMMDVMHostVersion"); - if (!startsWith(substr($output[0],31,8),"#")) { - return substr($output[0],18,8)." (compiled ".getMMDVMHostFileVersion().")"; + if (strlen($output[0]) > 26) { + return substr($output[0],18,8)." (compiled ".getMMDVMHostFileVersion(). ", GitID #" . substr($output[0],32,7) . ")"; } else { - return substr($output[0],18,8)." (compiled ".getMMDVMHostFileVersion().", GitID #".substr($output[0],32,7).")"; + return substr($output[0],18,8)." (compiled ".getMMDVMHostFileVersion(). ")"; } } }