From bcf0818faf364f866d1f49b94e2bf8a8da0488ed Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Fri, 26 Jan 2024 13:56:01 +0100 Subject: [PATCH] set correct channel for update-check if switching from apt-installed stable/testing to nightly Signed-off-by: Michael Kaufmann --- lib/Froxlor/Cli/UpdateCommand.php | 2 +- lib/Froxlor/Install/AutoUpdate.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Froxlor/Cli/UpdateCommand.php b/lib/Froxlor/Cli/UpdateCommand.php index 67e47beb3e..d7a255eb88 100644 --- a/lib/Froxlor/Cli/UpdateCommand.php +++ b/lib/Froxlor/Cli/UpdateCommand.php @@ -110,7 +110,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $newversionavail = true; $output->writeln('' . $text . ''); $result = self::SUCCESS; - } else if ($aucheck < 0 || $aucheck > 1) { + } elseif ($aucheck < 0 || $aucheck > 1) { if ($input->getOption('integer-return')) { $output->write(-1); return self::INVALID; diff --git a/lib/Froxlor/Install/AutoUpdate.php b/lib/Froxlor/Install/AutoUpdate.php index 73f6e09876..b2ff0522ea 100644 --- a/lib/Froxlor/Install/AutoUpdate.php +++ b/lib/Froxlor/Install/AutoUpdate.php @@ -69,7 +69,7 @@ public static function checkVersion(): int if (Settings::Get('system.update_channel') == 'testing') { $channel = '/testing'; } elseif (Settings::Get('system.update_channel') == 'nightly') { - if (empty(Froxlor::BRANDING)) { + if (empty(Froxlor::BRANDING) || substr(Froxlor::BRANDING, 0, 1) == '-') { $channel = '/nightly.0000000'; } else { $channel = '/' . substr(Froxlor::BRANDING, 1);