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 .github/workflows/plugin-ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2', '8.3']
php: ['8.1', '8.2', '8.3', '8.4']
os: [ubuntu-latest]

services:
Expand Down
9 changes: 3 additions & 6 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ function plugin_maint_check_servcheck_test(int $host): bool {
* @return bool True if host is in active maintenance schedule, false otherwise
*/
function plugin_maint_check_host(int $type, int $host): bool {
$schedules = db_fetch_assoc_prepared(
'SELECT *
$schedules = db_fetch_assoc_prepared('SELECT *
FROM plugin_maint_hosts
WHERE TYPE = ?
AND (host = ? OR host = 0)',
Expand Down Expand Up @@ -99,8 +98,7 @@ function plugin_maint_check_host(int $type, int $host): bool {
* @return bool True if schedule is active now, false otherwise
*/
function plugin_maint_check_schedule(int $schedule): bool {
$sc = db_fetch_row_prepared(
'SELECT *
$sc = db_fetch_row_prepared('SELECT *
FROM plugin_maint_schedules
WHERE enabled = \'on\' AND id = ?',
[$schedule],
Expand Down Expand Up @@ -134,8 +132,7 @@ function plugin_maint_check_schedule(int $schedule): bool {
$sc['stime'] = $starttimelocal->getTimestamp();
$sc['etime'] = $endtimelocal->getTimestamp();
// save next interval so not need to recalculate
db_execute_prepared(
'UPDATE plugin_maint_schedules
db_execute_prepared('UPDATE plugin_maint_schedules
SET stime = ?, etime = ?
WHERE id = ?',
[$sc['stime'], $sc['etime'], $schedule],
Expand Down
Loading