From fd9eeeeae8a02b91e3141787989ce5439889fdce Mon Sep 17 00:00:00 2001 From: int2001 Date: Mon, 25 Mar 2024 06:45:59 +0000 Subject: [PATCH] Adjusted links to be more generic --- application/controllers/Debug.php | 2 +- application/views/debug/index.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/application/controllers/Debug.php b/application/controllers/Debug.php index e35d46cd8..f09d4c156 100644 --- a/application/controllers/Debug.php +++ b/application/controllers/Debug.php @@ -171,7 +171,7 @@ class Debug extends CI_Controller try { $st=exec('git fetch'); $versions['branch'] = trim(exec('git rev-parse --abbrev-ref HEAD')); // Get ONLY Name of the Branch we're on - $versions['latest_commit_hash']=substr(trim(exec('git log --pretty="%H" -n1 HEAD..origin'.'/'.$versions['branch'])),0,8); // fetch latest commit-hash from repo + $versions['latest_commit_hash']=substr(trim(exec('git log --pretty="%H" -n1 origin'.'/'.$versions['branch'])),0,8); // fetch latest commit-hash from repo } catch (Exception $e) { $versions['latest_commit_hash']=''; $versions['branch']=''; diff --git a/application/views/debug/index.php b/application/views/debug/index.php index 79758624e..8af44a95e 100644 --- a/application/views/debug/index.php +++ b/application/views/debug/index.php @@ -229,9 +229,9 @@ $branch = trim(exec('git rev-parse --abbrev-ref HEAD')); // Get ONLY Name of the Branch we're on $url = trim(exec('git remote get-url ' . $remote)); if (strpos($url, 'https://github.com') !== false) { - $owner = preg_replace('/https:\/\/github\.com\/(\w+)\/Wavelog\.git/', '$1', $url); + $owner = preg_replace('/https:\/\/github\.com\/(\w+)\/[w|W]avelog\.git/', '$1', $url); } else if (strpos($url, 'git@github.com') !== false) { - $owner = preg_replace('/git@github\.com:(\w+)\/Wavelog\.git/', '$1', $url); + $owner = preg_replace('/git@github\.com:(\w+)\/[w|W]avelog\.git/', '$1', $url); } } $tag = trim(exec('git describe --tags ' . $commitHash)); @@ -267,7 +267,7 @@ Commit - + n/a