mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
PSR2 Cleanup: /html edition
Travis tests for code conformance. Ignore warnings for now. Fixed all errors, left most warnings.
This commit is contained in:
@@ -3,8 +3,7 @@
|
||||
foreach ($ports as $port) {
|
||||
if (is_integer($row / 2)) {
|
||||
$row_colour = $list_colour_a;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$row_colour = $list_colour_b;
|
||||
}
|
||||
|
||||
@@ -16,8 +15,7 @@ foreach ($ports as $port) {
|
||||
|
||||
if ($port['in_errors'] > 0 || $port['out_errors'] > 0) {
|
||||
$error_img = generate_port_link($port, "<img src='images/16/chart_curve_error.png' alt='Interface Errors' border=0>", errors);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$error_img = '';
|
||||
}
|
||||
|
||||
@@ -28,15 +26,13 @@ foreach ($ports as $port) {
|
||||
|
||||
if ($_SESSION['widescreen']) {
|
||||
$width = 357;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$width = 315;
|
||||
}
|
||||
|
||||
if ($_SESSION['widescreen']) {
|
||||
$width_div = 438;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$width_div = 393;
|
||||
}
|
||||
|
||||
|
@@ -18,8 +18,7 @@ $cols = array(
|
||||
foreach ($cols as $sort => $col) {
|
||||
if (isset($vars['sort']) && $vars['sort'] == $sort) {
|
||||
echo '<th>'.$col.' *</th>';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
echo '<th><a href="'.generate_url($vars, array('sort' => $sort)).'">'.$col.'</a></th>';
|
||||
}
|
||||
}
|
||||
@@ -35,11 +34,9 @@ foreach ($ports as $port) {
|
||||
if (port_permitted($port['port_id'], $port['device_id'])) {
|
||||
if ($port['ifAdminStatus'] == 'down') {
|
||||
$ports_disabled++;
|
||||
}
|
||||
else if ($port['ifAdminStatus'] == 'up' && $port['ifOperStatus'] == 'down') {
|
||||
} elseif ($port['ifAdminStatus'] == 'up' && $port['ifOperStatus'] == 'down') {
|
||||
$ports_down++;
|
||||
}
|
||||
else if ($port['ifAdminStatus'] == 'up' && $port['ifOperStatus'] == 'up') {
|
||||
} elseif ($port['ifAdminStatus'] == 'up' && $port['ifOperStatus'] == 'up') {
|
||||
$ports_up++;
|
||||
}
|
||||
|
||||
@@ -51,8 +48,7 @@ foreach ($ports as $port) {
|
||||
|
||||
if ((isset($port['in_errors']) && $port['in_errors'] > 0) || (isset($ports['out_errors']) && $port['out_errors'] > 0)) {
|
||||
$error_img = generate_port_link($port, "<img src='images/16/chart_curve_error.png' alt='Interface Errors' border=0>", errors);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$error_img = '';
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user