mirror of
https://github.com/unraid/webgui.git
synced 2026-04-24 11:19:25 -05:00
Updated PHP to preferred "elseif" single statement
This commit is contained in:
@@ -181,7 +181,7 @@ case 'port':
|
||||
$mtu = file_get_contents("/sys/class/net/$port/mtu");
|
||||
if (substr($port,0,4)=='bond') {
|
||||
$ports[$i++] = exec("grep -Pom1 '^Bonding Mode: \K.+' /proc/net/bonding/$port").", mtu $mtu";
|
||||
} else if ($port=='lo') {
|
||||
} elseif ($port=='lo') {
|
||||
$ports[$i++] = str_replace('yes','loopback',exec("ethtool lo|grep -Pom1 '^\s+Link detected: \K.+'"));
|
||||
} else {
|
||||
unset($info);
|
||||
|
||||
@@ -92,7 +92,7 @@ function fs_info(&$disk) {
|
||||
if ($disk['fsStatus']=='-') {
|
||||
echo "<td colspan='5'></td>";
|
||||
return;
|
||||
} else if ($disk['fsStatus']=='Mounted') {
|
||||
} elseif ($disk['fsStatus']=='Mounted') {
|
||||
echo "<td>{$disk['fsType']}</td>";
|
||||
echo "<td>".my_scale($disk['fsSize']*1024,$unit)." $unit</td>";
|
||||
if ($display['text']%10==0) {
|
||||
|
||||
@@ -69,8 +69,8 @@ case "attributes":
|
||||
$color = "";
|
||||
$highlight = strpos($info[8],'FAILING_NOW')!==false || ($select ? $info[5]>0 && $info[3]<=$info[5]*$level : $info[9]>0);
|
||||
if (in_array($info[0], $events) && $highlight) $color = " class='warn'";
|
||||
else if (in_array($info[0], $temps)) {
|
||||
if ($info[9]>=$max) $color = " class='alert'"; else if ($info[9]>=$hot) $color = " class='warn'";
|
||||
elseif (in_array($info[0], $temps)) {
|
||||
if ($info[9]>=$max) $color = " class='alert'"; elseif ($info[9]>=$hot) $color = " class='warn'";
|
||||
}
|
||||
if ($info[8]=='-') $info[8] = 'Never';
|
||||
if ($info[0]==9 && is_numeric($info[9])) duration($info[9]);
|
||||
|
||||
Reference in New Issue
Block a user