Explorar o código

fix commit message not showing up

causefx %!s(int64=7) %!d(string=hai) anos
pai
achega
09db0a6261
Modificáronse 2 ficheiros con 5 adicións e 2 borrados
  1. 3 0
      api/functions.php
  2. 2 2
      api/functions/static-globals.php

+ 3 - 0
api/functions.php

@@ -30,6 +30,9 @@ if (isset($GLOBALS['dbLocation'])) {
 		$getBranch = file_get_contents(dirname(__DIR__, 1) . DIRECTORY_SEPARATOR . 'Docker.txt');
 		$getBranch = (empty($getBranch)) ? 'v2-master' : trim($getBranch);
 		$GLOBALS['branch'] = $getBranch;
+		if (!isset($GLOBALS['commit']) || $GLOBALS['commit'] == 'n/a') {
+			$GLOBALS['commit'] = $GLOBALS['quickCommit'];
+		}
 	}
 	//Upgrade Check
 	upgradeCheck();

+ 2 - 2
api/functions/static-globals.php

@@ -16,9 +16,9 @@ $GLOBALS['docker'] = (file_exists(dirname(__DIR__, 2) . DIRECTORY_SEPARATOR . 'D
 if ($GLOBALS['docker']) {
 	$getCommit = file_get_contents(dirname(__DIR__, 2) . DIRECTORY_SEPARATOR . 'Github.txt');
 	$getCommit = (empty($getCommit)) ? 'n/a' : $getCommit;
-	$GLOBALS['commit'] = $getCommit;
+	$GLOBALS['quickCommit'] = $getCommit;
 }
-$GLOBALS['fileHash'] = (isset($GLOBALS['commit'])) ? $GLOBALS['commit'] : $GLOBALS['installedVersion'];
+$GLOBALS['fileHash'] = (isset($GLOBALS['quickCommit'])) ? $GLOBALS['quickCommit'] : $GLOBALS['installedVersion'];
 $GLOBALS['quickConfig'] = (file_exists($GLOBALS['userConfigPath'])) ? loadConfigOnce($GLOBALS['userConfigPath']) : null;
 // Quick function for plugins
 function pluginFiles($type)