diff options
Diffstat (limited to 'wizard/index.php')
-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 />", |