From 2ab1768bce0e8884ea55d110355cb04e08be856b Mon Sep 17 00:00:00 2001 From: Ahwx Date: Fri, 12 Jan 2024 21:07:15 +0100 Subject: [PATCH] fix(misc/footer.php): adds if-statement to make `commit`-hash a var after a check instead of just a constant --- misc/footer.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/misc/footer.php b/misc/footer.php index af063d48..99715e47 100644 --- a/misc/footer.php +++ b/misc/footer.php @@ -8,8 +8,11 @@
" . printftext("latest_commit", $hash) . ""; + if (file_exists(".git/refs/heads/main")) { + $hash = file_get_contents(".git/refs/heads/main"); + } + + echo "" . printftext("latest_commit", $hash) . ""; ?>