summaryrefslogtreecommitdiffstats
path: root/wizard/index.php
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-07-20 16:37:26 +0200
committerRemi Collet <remi@php.net>2022-07-20 16:37:26 +0200
commit6986f2a3f3da279895d0cfe9475235555e44c179 (patch)
tree1c78366395099816f215360f12c2cfa1490abc75 /wizard/index.php
parent61ccab1660fe667869e52ee801ebdb127293df50 (diff)
improve EL EOL message
Diffstat (limited to 'wizard/index.php')
-rw-r--r--wizard/index.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/wizard/index.php b/wizard/index.php
index 09bb06d0..143d65b2 100644
--- a/wizard/index.php
+++ b/wizard/index.php
@@ -199,8 +199,16 @@ $err = false;
if ($os) {
list($dist, $ver) = explode(' ', $os, 2);
if ($ver == 6) {
- $days = (int)((mktime(0,0,0,11,30,2020) - time()) / (60 * 60 * 24));
- printf("<li><b>WARNING: %s</b> will reach its <b>end of life</b> in November 2020, in <b>$days days</b>, upgrade is strongly recommended.</li><br />", $os);
+ $days = (int)((mktime(0,0,0,6,30,2024) - 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 November 2020, 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 November 2020, 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 November 2020, 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);