diff options
-rw-r--r-- | frontends/php/chart2.php | 8 | ||||
-rw-r--r-- | frontends/php/chart6.php | 13 |
2 files changed, 11 insertions, 10 deletions
diff --git a/frontends/php/chart2.php b/frontends/php/chart2.php index 1873500b..048e6c55 100644 --- a/frontends/php/chart2.php +++ b/frontends/php/chart2.php @@ -54,10 +54,10 @@ include_once 'include/page_header.php'; $denyed_hosts = get_accessible_hosts_by_user($USER_DETAILS, PERM_READ_ONLY, PERM_MODE_LT); if( !($db_data = DBfetch(DBselect('SELECT g.*,h.host,h.hostid '. - ' FROM graphs g '. - ' LEFT JOIN graphs_items gi ON g.graphid=gi.graphid '. - ' LEFT JOIN items i ON gi.itemid=i.itemid '. - ' LEFT JOIN hosts h ON i.hostid=h.hostid '. + ' FROM graphs as g '. + ' LEFT JOIN graphs_items as gi ON g.graphid=gi.graphid '. + ' LEFT JOIN items as i ON gi.itemid=i.itemid '. + ' LEFT JOIN hosts as h ON i.hostid=h.hostid '. ' WHERE g.graphid='.$_REQUEST['graphid']. ' AND ( h.hostid not in ('.$denyed_hosts.') '. ' OR h.hostid is NULL) ')))) diff --git a/frontends/php/chart6.php b/frontends/php/chart6.php index 4819991b..6ce57448 100644 --- a/frontends/php/chart6.php +++ b/frontends/php/chart6.php @@ -57,12 +57,13 @@ include_once "include/page_header.php"; if( !($db_data = DBfetch(DBselect( 'SELECT g.*,h.host,h.hostid '. - ' FROM graphs g '. - ' LEFT JOIN graphs_items gi ON g.graphid=gi.graphid '. - ' LEFT JOIN items i ON gi.itemid=i.itemid '. - ' LEFT JOIN hosts h ON i.hostid=h.hostid '. - ' WHERE g.graphid='.$_REQUEST["graphid"]. - ' OR h.hostid IS NULL) ')))) + ' FROM graphs as g '. + ' LEFT JOIN graphs_items as gi ON g.graphid=gi.graphid '. + ' LEFT JOIN items as i ON gi.itemid=i.itemid '. + ' LEFT JOIN hosts as h ON i.hostid=h.hostid '. + ' WHERE g.graphid='.$_REQUEST['graphid']. + ' AND ( h.hostid not in ('.$denyed_hosts.') '. + ' OR h.hostid is NULL) ')))) { access_deny(); } |