Minor fixes, some cleanups, and standardising on echo("x") instead of echo "x"

git-svn-id: http://www.observium.org/svn/observer/trunk@1728 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-11-20 14:04:07 +00:00
parent 0cd548f0f2
commit 30bdd952ee
63 changed files with 199 additions and 283 deletions
-2
View File
@@ -32,7 +32,6 @@ while($sensor = mysql_fetch_array($volt_data)) {
if($sensor['sensor_current'] > $sensor['sensor_limit_low'] && $volt <= $sensor['sensor_limit_low'])
{
if($device['sysContact']) { $email = $device['sysContact']; } else { $email = $config['email_default']; }
$msg = "Voltage Alarm: " . $device['hostname'] . " " . $sensor['sensor_descr'] . " is " . $volt . "V (Limit " . $sensor['sensor_limit'];
$msg .= "V) at " . date($config['timestamp_format']);
notify($device, "Voltage Alarm: " . $device['hostname'] . " " . $sensor['sensor_descr'], $msg);
@@ -41,7 +40,6 @@ while($sensor = mysql_fetch_array($volt_data)) {
}
else if($sensor['sensor_current'] < $sensor['sensor_limit'] && $volt >= $sensor['sensor_limit'])
{
if($device['sysContact']) { $email = $device['sysContact']; } else { $email = $config['email_default']; }
$msg = "Voltage Alarm: " . $device['hostname'] . " " . $sensor['sensor_descr'] . " is " . $volt . "V (Limit " . $sensor['sensor_limit'];
$msg .= "V) at " . date($config['timestamp_format']);
notify($device, "Voltage Alarm: " . $device['hostname'] . " " . $sensor['sensor_descr'], $msg);