Bernd Wurst commited on 2018-07-18 15:03:13
Zeige 3 geänderte Dateien mit 18 Einfügungen und 0 Löschungen.
| ... | ... |
@@ -146,6 +146,8 @@ $phpoptions = "<h5>PHP</h5> |
| 146 | 146 |
$options[$tag] = 'PHP '.$info['major'].'.'.$info['minor']; |
| 147 | 147 |
if ($info['status'] == 'deprecated') {
|
| 148 | 148 |
$options[$tag] .= ' (veraltet)'; |
| 149 |
+ } elseif ($info['status'] == 'used') {
|
|
| 150 |
+ $options[$tag] .= ' (nur Bestandsschutz)'; |
|
| 149 | 151 |
} |
| 150 | 152 |
} |
| 151 | 153 |
$phpoptions = " |
| ... | ... |
@@ -37,7 +37,21 @@ function valid_php_versions() {
|
| 37 | 37 |
$ret[$key]['status'] = 'deprecated'; |
| 38 | 38 |
} |
| 39 | 39 |
} |
| 40 |
+ /* Bis hier: aus der Datenbank ausgelesen */ |
|
| 40 | 41 |
DEBUG($ret); |
| 42 |
+ /* Sonderfall: Wenn ein User noch Vhosts einer anderen Version hat, dann bleibt diese erlaubt */ |
|
| 43 |
+ $list = list_vhosts(); |
|
| 44 |
+ foreach ($list as $vhost) {
|
|
| 45 |
+ if ($vhost['php'] && !array_key_exists($vhost['php'], $ret)) {
|
|
| 46 |
+ $key = $vhost['php']; |
|
| 47 |
+ $ret = array($key => array('major' => null, 'minor' => null, 'status' => 'regular')) + $ret;
|
|
| 48 |
+ /* Wir nehmen an, dass unsere Tags immer an zweitletzter Stelle die Major-Version und |
|
| 49 |
+ an letzter Stelle die Minor-Version enthalten */ |
|
| 50 |
+ $ret[$key]['major'] = substr($key, -2, 1); |
|
| 51 |
+ $ret[$key]['minor'] = substr($key, -1, 1); |
|
| 52 |
+ $ret[$key]['status'] = 'used'; |
|
| 53 |
+ } |
|
| 54 |
+ } |
|
| 41 | 55 |
return $ret; |
| 42 | 56 |
} |
| 43 | 57 |
|
| ... | ... |
@@ -160,6 +160,8 @@ if (count($vhosts) > 0) {
|
| 160 | 160 |
$php = icon_enabled_phpxx('PHP in Version '.$phpinfo['major'].'.'.$phpinfo['minor'].' eingeschaltet', $phpinfo['major'], $phpinfo['minor']);
|
| 161 | 161 |
if ($phpinfo['status'] == 'deprecated') {
|
| 162 | 162 |
$php .= ' '.icon_warning('Diese PHP-Version ist veraltet!');
|
| 163 |
+ } elseif ($phpinfo['status'] == 'used') {
|
|
| 164 |
+ $php .= ' '.icon_warning('Diese PHP-Version hat für Sie aktuell nur noch Bestandsschutz');
|
|
| 163 | 165 |
} |
| 164 | 166 |
} else {
|
| 165 | 167 |
$php = icon_disabled('PHP ausgeschaltet');
|
| 166 | 168 |