Skip to content

Commit

Permalink
fix Cacti#5705 - unknown column disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
xmacan committed Mar 26, 2024
1 parent ce76033 commit 6f48bf4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/html.php
Expand Up @@ -308,7 +308,7 @@ function html_graph_area(&$graph_array, $no_graphs_message = '', $extra_url_args

foreach ($graph_array as $graph) {
if (!isset($graph['host_id'])) {
list($graph['host_id'], $graph['disabled']) = db_fetch_cell_prepared('SELECT host_id, disabled FROM graph_local WHERE id = ?', array($graph['local_graph_id']));
list($graph['host_id'], $graph['disabled']) = db_fetch_cell_prepared('SELECT host_id, disabled FROM graph_local AS gl LEFT JOIN host AS h ON gl.host_id = h.id WHERE gl.id = ?', array($graph['local_graph_id']));
}

if ($i == 0) {
Expand Down Expand Up @@ -392,7 +392,7 @@ function html_graph_thumbnail_area(&$graph_array, $no_graphs_message = '', $extr
$start = true;
foreach ($graph_array as $graph) {
if (!isset($graph['host_id'])) {
list($graph['host_id'], $graph['disabled']) = db_fetch_cell_prepared('SELECT host_id, disabled FROM graph_local WHERE id = ?', array($graph['local_graph_id']));
list($graph['host_id'], $graph['disabled']) = db_fetch_cell_prepared('SELECT host_id, disabled FROM graph_local AS gl LEFT JOIN host AS h ON gl.host_id = h.id WHERE gl.id = ?', array($graph['local_graph_id']));
}

if (isset($graph['graph_template_name'])) {
Expand Down

0 comments on commit 6f48bf4

Please sign in to comment.