Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion graph_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function get_matching_nodes() {
get_filter_request_var('predefined_timespan');
get_filter_request_var('predefined_timeshift');
get_filter_request_var('graphs');
get_filter_request_var('thumbnails', FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => '(true|false)')));
get_filter_request_var('thumbnails', FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => '^(true|false)$')));

if (isset_request_var('predefined_timespan')) {
set_graph_config_option('default_timespan', get_request_var('predefined_timespan'));
Expand Down
4 changes: 2 additions & 2 deletions lib/api_automation.php
Original file line number Diff line number Diff line change
Expand Up @@ -2764,7 +2764,7 @@ function create_all_header_nodes($item_id, $rule) {
LEFT JOIN host_template AS ht
ON h.host_template_id=ht.id ';

$sql_where = 'WHERE h.id='. $item_id . ' AND h.deleted = "" ';
$sql_where = 'WHERE h.id=? AND h.deleted = "" ';
} elseif ($rule['leaf_type'] == TREE_ITEM_TYPE_GRAPH) {
/* graphs require a different set of tables to be joined */
$sql_tables = 'FROM host AS h
Expand All @@ -2777,7 +2777,7 @@ function create_all_header_nodes($item_id, $rule) {
LEFT JOIN graph_templates_graph AS gtg
ON gl.id=gtg.local_graph_id ';

$sql_where = 'WHERE gl.id=' . $item_id . ' AND h.deleted = "" ';
$sql_where = 'WHERE gl.id=? AND h.deleted = "" ';
}

/* get the WHERE clause for matching hosts */
Expand Down