From 32e9ea0a1e0168d7049e975c2c30ae2ea91faca9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 4 Nov 2022 11:59:32 +0100 Subject: Wizard: also display close to EOL message for F35 --- wizard/index.php | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'wizard') 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("
  • %s has reached its end of life, upgrade is strongly recommended.

  • ", $os); + + } else if (($dist == 'Fedora' && $ver>=FC_DEV) || ($dist != 'Fedora' && $ver>=EL_DEV)) { + printf("
  • WARNING: %s is a development version, not ready for production.

  • ", $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("
  • WARNING: %s will reach its end of life in June 2024, in $months months, upgrade is heartily recommended.

  • ", $os); + printf("
  • WARNING: %s will reach its end of life in $eol, in $months months, upgrade is heartily recommended.

  • ", $os); } else if ($weeks >= 8) { - printf("
  • WARNING: %s will reach its end of life in June 2024, in $weeks weeks, upgrade is strongly recommended.

  • ", $os); + printf("
  • WARNING: %s will reach its end of life in $eol, in $weeks weeks, upgrade is strongly recommended.

  • ", $os); } else { - printf("
  • WARNING: %s will reach its end of life in June 2024, in $days days, upgrade is urgently recommended.

  • ", $os); + printf("
  • WARNING: %s will reach its end of life in $eol, in $days days, upgrade is urgently recommended.

  • ", $os); } } - if (($dist == 'Fedora' && $ver<=FC_EOL) || ($dist != 'Fedora' && $ver<=EL_EOL)) { - printf("
  • %s has reached its end of life, upgrade is strongly recommended.

  • ", $os); - } - if (($dist == 'Fedora' && $ver>=FC_DEV) || ($dist != 'Fedora' && $ver>=EL_DEV)) { - printf("
  • WARNING: %s is a development version, not ready for production.

  • ", $os); - } } if ($php && $os) { printf("
  • %s provides PHP version %s in its official repository

  • ", -- cgit