diff options
author | Remi Collet <remi@remirepo.net> | 2022-11-04 11:59:32 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2022-11-04 11:59:32 +0100 |
commit | 32e9ea0a1e0168d7049e975c2c30ae2ea91faca9 (patch) | |
tree | 4ae69673059a610f0a895b8095f8bc759fc6fa16 /wizard | |
parent | cbc2653db814815f7a075c0335ffc3b738027004 (diff) |
Wizard: also display close to EOL message for F35
Diffstat (limited to 'wizard')
-rw-r--r-- | wizard/index.php | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/wizard/index.php b/wizard/index.php index d364ec83..726b82b1 100644 --- a/wizard/index.php +++ b/wizard/index.php @@ -199,24 +199,26 @@ $counter = intval(@file_get_contents(COUNTER)); $err = false; if ($os) { list($dist, $ver) = explode(' ', $os, 2); - if ($ver == 7) { - $days = (int)((mktime(0,0,0,6,30,2024) - time()) / (60 * 60 * 24)); + if (($dist == 'Fedora' && $ver<=FC_EOL) || ($dist != 'Fedora' && $ver<=EL_EOL)) { + printf("<li><b>%s</b> has reached its <b>end of life</b>, upgrade is strongly recommended.</li><br />", $os); + + } else if (($dist == 'Fedora' && $ver>=FC_DEV) || ($dist != 'Fedora' && $ver>=EL_DEV)) { + printf("<li><b>WARNING: %s</b> is a <b>development</b> version, not ready for production.</li><br />", $os); + + } else if ($ver == 7 || $ver == 35) { + $days = ($ver == 7 ? mktime(0,0,0,6,30,2024) : mktime(0,0,0,12,13,2022)); + $eol = date("F Y", $days); + $days = (int)(($days - time()) / (60 * 60 * 24)); $weeks = round($days/7); $months = round($days/30); if ($months >= 6) { - printf("<li><b>WARNING: %s</b> will reach its <b>end of life</b> in June 2024, in <b>$months months</b>, upgrade is heartily recommended.</li><br />", $os); + printf("<li><b>WARNING: %s</b> will reach its <b>end of life</b> in $eol, in <b>$months months</b>, upgrade is heartily recommended.</li><br />", $os); } else if ($weeks >= 8) { - printf("<li><b>WARNING: %s</b> will reach its <b>end of life</b> in June 2024, in <b>$weeks weeks</b>, upgrade is strongly recommended.</li><br />", $os); + printf("<li><b>WARNING: %s</b> will reach its <b>end of life</b> in $eol, in <b>$weeks weeks</b>, upgrade is strongly recommended.</li><br />", $os); } else { - printf("<li><b>WARNING: %s</b> will reach its <b>end of life</b> in June 2024, in <b>$days days</b>, upgrade is urgently recommended.</li><br />", $os); + printf("<li><b>WARNING: %s</b> will reach its <b>end of life</b> in $eol, in <b>$days days</b>, upgrade is urgently recommended.</li><br />", $os); } } - if (($dist == 'Fedora' && $ver<=FC_EOL) || ($dist != 'Fedora' && $ver<=EL_EOL)) { - printf("<li><b>%s</b> has reached its <b>end of life</b>, upgrade is strongly recommended.</li><br />", $os); - } - if (($dist == 'Fedora' && $ver>=FC_DEV) || ($dist != 'Fedora' && $ver>=EL_DEV)) { - printf("<li><b>WARNING: %s</b> is a <b>development</b> version, not ready for production.</li><br />", $os); - } } if ($php && $os) { printf("<li><b>%s</b> provides PHP version <b>%s</b> in its official repository</li><br />", |