Merge pull request #50401 from nextcloud/backport/50368/stable 31 8

[stable31] fix: Properly read updater channel before returning version channel as a fallback
This commit is contained in:
Andy Scherzinger 2025-01-25 08:48:32 +01:00 committed by GitHub
commit bb2980e738
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -77,6 +77,12 @@ class ServerVersion {
* @since 31.0.0
*/
public function getChannel(): string {
$updaterChannel = Server::get(IConfig::class)->getSystemValueString('updater.release.channel', $this->channel);
if (in_array($updaterChannel, ['beta', 'stable', 'enterprise', 'git'], true)) {
return $updaterChannel;
}
return $this->channel;
}