From 739b5725f2b3d3f09e4c9cd4eb8dcc1198775b48 Mon Sep 17 00:00:00 2001 From: phl0 Date: Wed, 12 Apr 2017 16:39:14 +0200 Subject: [PATCH 1/3] Save some substrs --- include/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/functions.php b/include/functions.php index 5c3e724..cac8e18 100644 --- a/include/functions.php +++ b/include/functions.php @@ -823,8 +823,8 @@ function decodeAlias($logLine) { function getGitVersion(){ if (file_exists(".git")) { - exec("git rev-parse HEAD", $output); - return 'GitID #'.substr($output[0],0,7).''; + exec("git rev-parse --short HEAD", $output); + return 'GitID #'.$output[0].''; } else { return 'GitID unknown'; } From 7dacd2f98c4ade34826baf14bf56848bdfecee89 Mon Sep 17 00:00:00 2001 From: phl0 Date: Wed, 12 Apr 2017 16:42:08 +0200 Subject: [PATCH 2/3] Fix typo --- include/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/functions.php b/include/functions.php index cac8e18..c3f1d08 100644 --- a/include/functions.php +++ b/include/functions.php @@ -824,7 +824,7 @@ function decodeAlias($logLine) { function getGitVersion(){ if (file_exists(".git")) { exec("git rev-parse --short HEAD", $output); - return 'GitID #'.$output[0].''; + return 'GitID #'.$output[0].''; } else { return 'GitID unknown'; } From e2cf12ea88a6544fe5232f4859270c2346c7489b Mon Sep 17 00:00:00 2001 From: phl0 Date: Wed, 12 Apr 2017 16:43:12 +0200 Subject: [PATCH 3/3] Fix the fix of the typo ... ARGH --- include/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/functions.php b/include/functions.php index c3f1d08..2a91dec 100644 --- a/include/functions.php +++ b/include/functions.php @@ -824,7 +824,7 @@ function decodeAlias($logLine) { function getGitVersion(){ if (file_exists(".git")) { exec("git rev-parse --short HEAD", $output); - return 'GitID #'.$output[0].''; + return 'GitID #'.$output[0].''; } else { return 'GitID unknown'; }