Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indirect access to variables, properties and methods will be evaluate… #1340

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions scripts/ajax_tooltip.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -229,27 +229,27 @@
switch($row["Field"]){
case "SNMPCommunity":
if(isset($pdu->SNMPCommunity)){
$tooltip.=__($row["Label"]).": ".$pdu->$row["Field"]."<br>\n";
$tooltip.=__($row["Label"]).": ".$pdu->{$row["Field"]}."<br>\n";
}else{
if($dev->Hypervisor){
$tooltip.=__($row["Label"]).": ".$dev->$row["Field"]."<br>\n";
$tooltip.=__($row["Label"]).": ".$dev->{$row["Field"]}."<br>\n";
}
}
break;
case "Hypervisor":
if($dev->Hypervisor){
$tooltip.=__($row["Label"]).": ".$dev->$row["Field"]."<br>\n";
$tooltip.=__($row["Label"]).": ".$dev->{$row["Field"]}."<br>\n";
}
break;
case "EscalationID":
$esc=new Escalations();
$esc->EscalationID=$dev->$row["Field"];
$esc->EscalationID=$dev->{$row["Field"]};
$esc->GetEscalation();
$tooltip.=__($row["Label"]).": $esc->Details<br>\n";
break;
case "EscalationTimeID":
$escTime=new EscalationTimes();
$escTime->EscalationTimeID=$dev->$row["Field"];
$escTime->EscalationTimeID=$dev->{$row["Field"]};
$escTime->GetEscalationTime();
$tooltip.=__($row["Label"]).": $escTime->TimePeriod<br>\n";
break;
Expand All @@ -270,7 +270,7 @@
break;
case "ChassisSlots":
if($dev->DeviceType=='Chassis'){
$tooltip.=__($row["Label"])." ".$dev->$row["Field"]."<br>\n";
$tooltip.=__($row["Label"])." ".$dev->{$row["Field"]}."<br>\n";
}
break;
case "Model":
Expand Down Expand Up @@ -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?
Expand Down