BUGFIX: $graph[0] -> $graph["graph"]

git-svn-id: http://www.observium.org/svn/observer/trunk@2032 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Geert Hauwaerts 2011-04-06 18:26:16 +00:00
parent 0e6a1550f1
commit 1760eff9df

View File

@ -316,11 +316,11 @@ while ($device = mysql_fetch_assoc($device_query))
$query = mysql_query("SELECT `graph` FROM `device_graphs` WHERE `device_id` = '".$device['device_id']."'");
while ($graph = mysql_fetch_assoc($query))
{
if (!isset($graphs[$graph[0]]))
if (!isset($graphs[$graph["graph"]]))
{
mysql_query("DELETE FROM `device_graphs` WHERE `device_id` = '".$device['device_id']."' AND `graph` = '".$graph[0]."'");
mysql_query("DELETE FROM `device_graphs` WHERE `device_id` = '".$device['device_id']."' AND `graph` = '".$graph["graph"]."'");
} else {
$oldgraphs[$graph[0]] = TRUE;
$oldgraphs[$graph["graph"]] = TRUE;
}
}
@ -368,4 +368,4 @@ unset($config); ### Remove this for testing
#print_r(get_defined_vars());
?>
?>