diff --git a/scripts/ajax_tooltip.php b/scripts/ajax_tooltip.php
index eb1e66339..ddc233d62 100644
--- a/scripts/ajax_tooltip.php
+++ b/scripts/ajax_tooltip.php
@@ -114,7 +114,7 @@
$HumMax=intval($config->ParameterArray["HumidityRedHigh"]);
- while(list($devID,$device)=each($devList)){
+ foreach($devList as $devID=>$device){
$totalWatts+=$device->GetDeviceTotalPower();
$DeviceTotalWeight=$device->GetDeviceTotalWeight();
$totalWeight+=$DeviceTotalWeight;
@@ -229,27 +229,27 @@
switch($row["Field"]){
case "SNMPCommunity":
if(isset($pdu->SNMPCommunity)){
- $tooltip.=__($row["Label"]).": ".$pdu->$row["Field"]."
\n";
+ $tooltip.=__($row["Label"]).": ".$pdu->{$row["Field"]}."
\n";
}else{
if($dev->Hypervisor){
- $tooltip.=__($row["Label"]).": ".$dev->$row["Field"]."
\n";
+ $tooltip.=__($row["Label"]).": ".$dev->{$row["Field"]}."
\n";
}
}
break;
case "Hypervisor":
if($dev->Hypervisor){
- $tooltip.=__($row["Label"]).": ".$dev->$row["Field"]."
\n";
+ $tooltip.=__($row["Label"]).": ".$dev->{$row["Field"]}."
\n";
}
break;
case "EscalationID":
$esc=new Escalations();
- $esc->EscalationID=$dev->$row["Field"];
+ $esc->EscalationID=$dev->{$row["Field"]};
$esc->GetEscalation();
$tooltip.=__($row["Label"]).": $esc->Details
\n";
break;
case "EscalationTimeID":
$escTime=new EscalationTimes();
- $escTime->EscalationTimeID=$dev->$row["Field"];
+ $escTime->EscalationTimeID=$dev->{$row["Field"]};
$escTime->GetEscalationTime();
$tooltip.=__($row["Label"]).": $escTime->TimePeriod
\n";
break;
@@ -270,7 +270,7 @@
break;
case "ChassisSlots":
if($dev->DeviceType=='Chassis'){
- $tooltip.=__($row["Label"])." ".$dev->$row["Field"]."
\n";
+ $tooltip.=__($row["Label"])." ".$dev->{$row["Field"]}."
\n";
}
break;
case "Model":
@@ -319,10 +319,10 @@
}
break;
case "Weight":
- $dev->$row["Field"]=$dev->GetDeviceTotalWeight();
+ $dev->{$row["Field"]}=$dev->GetDeviceTotalWeight();
goto end; // cringe now
case "NominalWatts":
- $dev->$row["Field"]=$dev->GetDeviceTotalPower();
+ $dev->{$row["Field"]}=$dev->GetDeviceTotalPower();
goto end; // fuck you, yeah I really did that
case "DeviceType":
// if this is a chassis device display the number of blades?