Skip to content
Open
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
4 changes: 1 addition & 3 deletions includes/arrays.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,7 @@
$default_priority = LOG_WARNING;
}

if (!isset($step)) {
$step = read_config_option('poller_interval');
}
$step ??= read_config_option('poller_interval');
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description mentions prepared statements / SQL parameterization and RLIKE/LIKE injection fixes, but the changes in this PR appear limited to ?? / ??= mechanical refactors in the touched files. Either update the PR description to match the actual changes, or include the intended SQL hardening changes in this PR.

Copilot uses AI. Check for mistakes.

switch($step) {
case '10':
Expand Down
28 changes: 6 additions & 22 deletions notify_lists.php
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ function form_actions() {

bottom_footer();
} else {
$save = ['post' => $_POST, 'selected_items' => isset($selected_items) ? $selected_items : ''];
$save = ['post' => $_POST, 'selected_items' => $selected_items ?? ''];
api_plugin_hook_function('notify_list_form_confirm', $save);
}
}
Expand Down Expand Up @@ -974,7 +974,7 @@ function edit() {
draw_edit_form(
[
'config' => [],
'fields' => inject_form_variables($fields_notification, (isset($list) ? $list : []))
'fields' => inject_form_variables($fields_notification, ($list ?? []))
]
);

Expand Down Expand Up @@ -1047,11 +1047,7 @@ function hosts($header_label) {
// ================= input validation =================

// if the number of rows is -1, set it to the default
if (get_request_var('rows') == -1) {
$rows = read_config_option('num_rows_table');
} else {
$rows = get_request_var('rows');
}
$rows = plugin_get_rows_per_page();

html_start_box(__('Associated Devices', 'thold') . ' ' . html_escape($header_label), '100%', false, '3', 'center', '');

Expand Down Expand Up @@ -1375,11 +1371,7 @@ function tholds($header_label) {
}

// if the number of rows is -1, set it to the default
if (get_request_var('rows') == -1) {
$rows = read_config_option('num_rows_table');
} else {
$rows = get_request_var('rows');
}
$rows = plugin_get_rows_per_page();

$sql_where = '';

Expand Down Expand Up @@ -1724,11 +1716,7 @@ function templates($header_label) {
thold_template_request_validation();

// if the number of rows is -1, set it to the default
if (get_request_var('rows') == -1) {
$rows = read_config_option('num_rows_table');
} else {
$rows = get_request_var('rows');
}
$rows = plugin_get_rows_per_page();

$sql_where = '';
$sql_order = get_order_string();
Expand Down Expand Up @@ -2069,11 +2057,7 @@ function lists() {
// ================= input validation =================

// if the number of rows is -1, set it to the default
if (get_request_var('rows') == -1) {
$rows = read_config_option('num_rows_table');
} else {
$rows = get_request_var('rows');
}
$rows = plugin_get_rows_per_page();

html_start_box(__('Notification Lists', 'thold'), '100%', false, '3', 'center', 'notify_lists.php?action=edit');

Expand Down
Loading
Loading