avoid redirect-loop when displaying error in admin-autoupdate; fix description for 'move to domain to other customer'

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-04-20 16:12:42 +02:00
parent ebceab96b4
commit b1191917b8
3 changed files with 24 additions and 22 deletions

View File

@@ -29,28 +29,30 @@ define('UPDATE_URI', "https://version.froxlor.org/Froxlor/api/" . \Froxlor\Froxl
define('RELEASE_URI', "https://autoupdate.froxlor.org/froxlor-{version}.zip");
define('CHECKSUM_URI', "https://autoupdate.froxlor.org/froxlor-{version}.zip.sha256");
// check for archive-stuff
if (!extension_loaded('zip')) {
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => 'error',
'errno' => 2
));
}
if ($page != 'error') {
// check for archive-stuff
if (!extension_loaded('zip')) {
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => 'error',
'errno' => 2
));
}
// 0.11.x requires 7.4 at least
if (version_compare("7.4.0", PHP_VERSION, ">=")) {
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => 'error',
'errno' => 10
));
}
// 0.11.x requires 7.4 at least
if (version_compare("7.4.0", PHP_VERSION, ">=")) {
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => 'error',
'errno' => 10
));
}
// check for webupdate to be enabled
if (\Froxlor\Settings::Config('enable_webupdate') != true) {
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => 'error',
'errno' => 11
));
// check for webupdate to be enabled
if (\Froxlor\Settings::Config('enable_webupdate') != true) {
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => 'error',
'errno' => 11
));
}
}
// display initial version check