check for minimum required php version in autoupdater

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2019-10-12 14:04:43 +02:00
parent 057f4aaa10
commit 15fa035dc4
3 changed files with 12 additions and 0 deletions

View File

@@ -36,6 +36,15 @@ if (! extension_loaded('zip')) {
));
}
// 0.10.x requires 7.0 at least
if (version_compare("7.0.0", PHP_VERSION, ">=")) {
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s,
'page' => 'error',
'errno' => 10
));
}
// display initial version check
if ($page == 'overview') {
@@ -221,5 +230,6 @@ elseif ($page == 'error') {
// 7 = local archive does not exist
// 8 = could not extract archive
// 9 = checksum mismatch
// 10 = <php-7.0
\Froxlor\UI\Response::standard_error('autoupdate_' . $errno);
}

View File

@@ -1866,6 +1866,7 @@ $lng['error']['autoupdate_6'] = 'Whoops, there was no (valid) version given to d
$lng['error']['autoupdate_7'] = 'The downloaded archive could not be found :(';
$lng['error']['autoupdate_8'] = 'The archive could not be extracted :(';
$lng['error']['autoupdate_9'] = 'The downloaded file did not pass the integrity check. Please try to update again.';
$lng['error']['autoupdate_10'] = 'Minimum supported version of PHP is 7.0';
$lng['admin']['server_php'] = 'PHP';
$lng['domains']['termination_date'] = 'Date of termination';

View File

@@ -1518,6 +1518,7 @@ $lng['error']['autoupdate_6'] = 'Woops, keine (gültige) Version angegeben für
$lng['error']['autoupdate_7'] = 'Das heruntergeladene Archiv konnte nicht gefunden werden :(';
$lng['error']['autoupdate_8'] = 'Das Archiv konnte nicht entpackt werden :(';
$lng['error']['autoupdate_9'] = 'Die heruntergeladene Datei konnte nicht verifiziert werden. Bitte erneut versuchen zu aktualisieren.';
$lng['error']['autoupdate_10'] = 'Minimum unterstützte Version von PHP ist 7.0';
$lng['domains']['termination_date'] = 'Kündigungsdatum';
$lng['domains']['termination_date_overview'] = 'gekündigt zum ';