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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

--- develop ---

* issue: Fix an uncaught `TypeError` from `html_nav_bar()` (the schedules, devices, webseer and servcheck lists passed the `page`/`rows`/`total_rows` request values as strings, which the typed core signature rejects under `declare(strict_types=1)`); the paging arguments are now cast to `int`
* refactor: Move schema management into includes/database.php (the thold model) and relocate functions.php into includes/; setup.php delegates via require_once, and plugin_maint_check_upgrade() now refreshes the schema via db_update_table(), re-registers the is_device_in_maintenance hook against includes/functions.php, and updates the full plugin_config row on a version change. Switches every file inclusion from include/include_once to require/require_once
* dev: Enforce patch coverage of changed lines in CI and remove the inert COMPOSER_ROOT_VERSION env from the Pest step
* feature: Add a standard Cacti search filter to the Maintenance Schedules list that also matches the hostname/description/location/site name of associated Thold devices and the hostname/description of associated Servcheck tests
Expand Down
8 changes: 4 additions & 4 deletions maint.php
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ function clearFilter() {

html_end_box();

$nav = html_nav_bar('maint.php', MAX_DISPLAY_PAGES, get_request_var('page'), $rows, $total_rows, 8, __('Schedules', 'maint'), 'page', 'main');
$nav = html_nav_bar('maint.php', MAX_DISPLAY_PAGES, (int) get_request_var('page'), (int) $rows, (int) $total_rows, 8, __('Schedules', 'maint'), 'page', 'main');

form_start('maint.php', 'chk');

Expand Down Expand Up @@ -1754,7 +1754,7 @@ function clearFilter() {
];

// generate page list
$nav = html_nav_bar('maint.php?action=edit&tab=hosts&id=' . get_request_var('id'), MAX_DISPLAY_PAGES, get_request_var('page'), $rows, $total_rows, 13, __('Devices', 'maint'), 'page', 'main');
$nav = html_nav_bar('maint.php?action=edit&tab=hosts&id=' . get_request_var('id'), MAX_DISPLAY_PAGES, (int) get_request_var('page'), (int) $rows, (int) $total_rows, 13, __('Devices', 'maint'), 'page', 'main');

form_start('maint.php', 'chk');

Expand Down Expand Up @@ -2022,7 +2022,7 @@ function clearFilter() {
$urls = [];
}

$nav = html_nav_bar('maint.php?action=edit&tab=webseer&id=' . get_request_var('id'), MAX_DISPLAY_PAGES, get_request_var('page'), $rows, $total_rows, 13, __('URLS', 'maint'), 'page', 'main');
$nav = html_nav_bar('maint.php?action=edit&tab=webseer&id=' . get_request_var('id'), MAX_DISPLAY_PAGES, (int) get_request_var('page'), (int) $rows, (int) $total_rows, 13, __('URLS', 'maint'), 'page', 'main');

form_start('maint.php', 'chk');

Expand Down Expand Up @@ -2309,7 +2309,7 @@ function clearFilter() {
$tests = [];
}

$nav = html_nav_bar('maint.php?action=edit&tab=servcheck&id=' . get_request_var('id'), MAX_DISPLAY_PAGES, get_request_var('page'), $rows, $total_rows, 13, __('Tests', 'maint'), 'page', 'main');
$nav = html_nav_bar('maint.php?action=edit&tab=servcheck&id=' . get_request_var('id'), MAX_DISPLAY_PAGES, (int) get_request_var('page'), (int) $rows, (int) $total_rows, 13, __('Tests', 'maint'), 'page', 'main');

form_start('maint.php', 'chk');

Expand Down
Loading