kill a whole bunch of trailing spaces

git-svn-id: http://www.observium.org/svn/observer/trunk@2516 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-09-20 09:55:11 +00:00
parent 9b270dd1e5
commit d864ce234f
103 changed files with 326 additions and 331 deletions

View File

@@ -1,10 +1,5 @@
<?php
## Who the fuck wrote this? it's like it was written by a retard challenged
## to use as many string manipulation functions as possible.
# Load our list of available applications
if ($handle = opendir($config['install_dir'] . "/includes/polling/applications/"))
{

View File

@@ -3,10 +3,10 @@
if($_POST['toggle_poller'] && isset($config['poller_modules'][$_POST['toggle_poller']]))
{
$module = mres($_POST['toggle_poller']);
if (isset($attribs['poll_'.$module]) && $attribs['poll_'.$module] != $config['poller_modules'][$_POST['toggle_poller']])
if (isset($attribs['poll_'.$module]) && $attribs['poll_'.$module] != $config['poller_modules'][$_POST['toggle_poller']])
{
del_dev_attrib($device, 'poll_' . $module);
} elseif ($config['poller_modules'][$_POST['toggle_poller']] == 0) {
} elseif ($config['poller_modules'][$_POST['toggle_poller']] == 0) {
set_dev_attrib($device, 'poll_' . $module, "1");
} else {
set_dev_attrib($device, 'poll_' . $module, "0");

View File

@@ -14,7 +14,7 @@ if ($_POST['editing'])
$update = array('community' => $_POST['community'], 'snmpver' => $_POST['snmpver'], 'port' => $_POST['port']);
if ($_POST['timeout']) { $update['timeout'] = $_POST['timeout']; } else { $update['timeout'] = array(NULL); }
if ($_POST['retries']) { $update['retries'] = $_POST['retries']; } else { $update['retries'] = array(NULL); }
$rows_updated = dbUpdate($update, 'devices', '`device_id` = ?',array($device['device_id']));
if ($rows_updated > 0)

View File

@@ -37,9 +37,9 @@ foreach ($config['graph_sections'] as $section)
echo(generate_link(ucfirst($type),$link_array,array('group'=>$type)));
if ($vars['group'] == $type)
{
echo("</span>");
if ($vars['group'] == $type)
{
echo("</span>");
}
$sep = " | ";
}

View File

@@ -23,7 +23,7 @@ foreach (dbFetchRows("SELECT * FROM `ucd_diskio` WHERE device_id = ? ORDER BY di
$graph_array_zoom['height'] = "125";
$graph_array_zoom['from'] = $config['time']['twoday'];
$graph_array_zoom['to'] = $config['time']['now'];
echo("<tr bgcolor='$row_colour'><th>");
echo(overlib_link($fs_url, $drive['diskio_descr'], generate_graph_tag($graph_array_zoom), NULL));

View File

@@ -7,7 +7,7 @@ $datas = array(
);
foreach ($datas as $name=>$type)
{
{
$graph_title = $name;
$graph_type = "device_".$type;
include("includes/print-device-graph.php");

View File

@@ -14,7 +14,7 @@ print_optionbar_start();
echo("Polling Interval: ");
foreach(array(0.25, 1, 2, 5, 15, 60) as $interval)
foreach(array(0.25, 1, 2, 5, 15, 60) as $interval)
{
echo($thinger);
if ($vars['interval'] == $interval) { echo("<span class='pagemenu-selected'>"); }

View File

@@ -18,7 +18,7 @@ foreach(dbFetchRows("SELECT * FROM links AS L, ports AS I WHERE I.device_id = ?
echo('<tr bgcolor="'.$bg_colour.'">');
echo('<td><span style="font-weight: bold;">'.generate_port_link($neighbour).'</span><br />'.$neighbour['ifAlias'].'</td>');
if(is_numeric($neighbour['remote_interface_id']) && $neighbour['remote_interface_id'])
if(is_numeric($neighbour['remote_interface_id']) && $neighbour['remote_interface_id'])
{
$remote_port = get_port_by_id($neighbour['remote_interface_id']);
$remote_device = device_by_id_cache($remote_port['device_id']);

View File

@@ -48,7 +48,7 @@ foreach (dbFetchRows("SELECT * FROM `cef_switching` WHERE `device_id` = ? ORDER
$interval = $cef['updated'] - $cef['updated_prev'];
if(!$entity['entPhysicalModelName'] && $entity['entPhysicalContainedIn'])
if(!$entity['entPhysicalModelName'] && $entity['entPhysicalContainedIn'])
{
$parent_entity = dbFetchRow("SELECT * FROM `entPhysical` WHERE device_id = ? AND `entPhysicalIndex` = ?", array($device['device_id'], $entity['entPhysicalContainedIn']));
$entity_descr = $entity['entPhysicalName'] . " (" . $parent_entity['entPhysicalModelName'] .")";

View File

@@ -4,7 +4,7 @@ include("includes/geshi/geshi.php");
if ($_SESSION['userlevel'] >= "7")
{
if (!is_array($config['rancid_configs'])) { $config['rancid_configs'] = array($config['rancid_configs']); }
foreach ($config['rancid_configs'] as $configs)
@@ -12,13 +12,13 @@ if ($_SESSION['userlevel'] >= "7")
if ($configs[strlen($configs)-1] != '/') { $configs .= '/'; }
if (is_file($configs . $device['hostname'])) { $file = $configs . $device['hostname']; }
}
echo('<div style="clear: both;">');
print_optionbar_start('', '');
echo("<span style='font-weight: bold;'>Config</span> &#187; ");
if (!$_GET['optc']) {
echo('<span class="pagemenu-selected">');
echo("<a href='device/".$device['device_id']."/showconfig/'> Latest</a>");
@@ -26,29 +26,29 @@ if ($_SESSION['userlevel'] >= "7")
} else {
echo("<a href='device/".$device['device_id']."/showconfig/'> Latest</a>");
}
if (function_exists('svn_log')) {
$sep = " | ";
$svnlogs = svn_log($file, SVN_REVISION_HEAD, NULL, 5);
$revlist = array();
foreach ($svnlogs as $svnlog) {
echo($sep);
$revlist[] = $svnlog["rev"];
if ($_GET['optc'] == $svnlog["rev"]) { echo('<span class="pagemenu-selected">'); }
echo("<a href='device/".$device['device_id']."/showconfig/" . $svnlog["rev"] . "/'> r" . $svnlog["rev"] ." <small>". date("d M H:i", strtotime($svnlog["date"])) . "</small></a>");
if ($_GET['optc'] == $svnlog["rev"]) { echo("</span>"); }
$sep = " | ";
}
}
print_optionbar_end();
if (function_exists('svn_log') && in_array($_GET['optc'], $revlist)) {
list($diff, $errors) = svn_diff($file, $_GET['optc']-1, $file, $_GET['optc']);
if (!$diff) {
@@ -59,7 +59,7 @@ if ($_SESSION['userlevel'] >= "7")
fclose($diff);
fclose($errors);
}
} else {
$fh = fopen($file, 'r') or die("Can't open file");
$text = fread($fh, filesize($file));

View File

@@ -9,7 +9,7 @@ echo("
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/vlans/bits/'>Bits</a> |
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/vlans/pkts/'>Packets</a> |
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/vlans/nupkts/'>NU Packets</a> |
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/vlans/errors/'>Errors</a>
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/vlans/errors/'>Errors</a>
");
print_optionbar_end();