mirror of
https://github.com/unraid/webgui.git
synced 2026-05-24 07:09:42 -05:00
fix: patch version override logic incorrect
This commit is contained in:
@@ -96,10 +96,17 @@ class ServerState
|
||||
|
||||
$this->var = $webguiGlobals['var'];
|
||||
|
||||
// If we're on a patch, we need to use the combinedVersion to check for updates
|
||||
$patcherVersion = null;
|
||||
if (file_exists('/tmp/Patcher/patches.json')) {
|
||||
$patchJson = @json_decode(@file_get_contents('/tmp/Patcher/patches.json'), true) ?: [];
|
||||
$this->var['version'] = $patchJson['combinedVersion'] ?? $this->var['version'];
|
||||
$patcherData = @json_decode(file_get_contents('/tmp/Patcher/patches.json'), true);
|
||||
$unraidVersionInfo = parse_ini_file('/etc/unraid-version');
|
||||
if ($patcherData['unraidVersion'] === $unraidVersionInfo['version']) {
|
||||
$patcherVersion = $patcherData['combinedVersion'] ?? null;
|
||||
}
|
||||
}
|
||||
// If we're on a patch, we need to use the combinedVersion to check for updates
|
||||
if ($patcherVersion) {
|
||||
$this->var['version'] = $patcherVersion;
|
||||
}
|
||||
|
||||
$this->nginxCfg = @parse_ini_file('/var/local/emhttp/nginx.ini') ?? [];
|
||||
|
||||
@@ -119,7 +119,10 @@ class UnraidOsCheck
|
||||
$patcherVersion = null;
|
||||
if (file_exists('/tmp/Patcher/patches.json')) {
|
||||
$patcherData = @json_decode(file_get_contents('/tmp/Patcher/patches.json'), true);
|
||||
$patcherVersion = $patcherData['combinedVersion'] ?? null;
|
||||
$unraidVersionInfo = parse_ini_file('/etc/unraid-version');
|
||||
if ($patcherData['unraidVersion'] === $unraidVersionInfo['version']) {
|
||||
$patcherVersion = $patcherData['combinedVersion'] ?? null;
|
||||
}
|
||||
}
|
||||
|
||||
$params['current_version'] = $patcherVersion ?: plugin('version', self::PLG_PATH) ?: _var($var, 'version');
|
||||
|
||||
Reference in New Issue
Block a user