Skip to content

Commit

Permalink
QA: #5828 - Handle Site Changes better
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWitness committed Sep 19, 2024
1 parent 0103d3c commit 08bd50e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions graph_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,21 @@ function get_matching_nodes() {
$rows = get_request_var('rows');
}

/* check to see if site_id and location are mismatched */
if (get_request_var('site_id') >= 0) {
if (get_request_var('location') != '0' && get_request_var('location') != '-1') {
$exists = db_fetch_cell_prepared('SELECT COUNT(*)
FROM host
WHERE site_id = ?
AND location = ?',
array(get_request_var('site_id'), get_request_var('location')));

if (!$exists) {
set_request_var('location', '-1');
}
}
}

$graph_list = array();

/* save selected graphs into url */
Expand Down

0 comments on commit 08bd50e

Please sign in to comment.