Robustness: lists take page 1 at least and an open end date, portal sessions go to the portal from the main address, custom page forms no longer load a missing post/ai.php, cron jobs that stop with an error code show as Failed with the parser saying what the mail server answered, the mail queue keeps a refreshed OAuth token for the rest of the run, the update check keeps the newest 100 commits and counts them all, restore_cli works on a database with no settings yet, the API reads a non-JSON body as no fields and clamps limit and offset, API client delete removes the client's uploads, contact anonymizing redacts stored values longest first, the asset transfer log names the asset, the client duplicate check escapes wildcards, and Access Modules drops its dead buttons and sorts only on its own columns; 26.11.9 changelog entries

This commit is contained in:
johnnyq
2026-11-17 16:15:23 -05:00
parent 44c7155078
commit 707fdaedd4
19 changed files with 107 additions and 63 deletions

View File

@@ -34,7 +34,18 @@ if (!file_exists("../config.php")) {
}
require_once "../config.php";
require_once "../includes/inc_set_timezone.php";
// A restore often goes into a database that has only got as far as config.php - the setup
// wizard's database step, with no settings yet. The timezone comes from the settings when
// they are there; inc_set_timezone.php takes them for granted and would stop the restore.
try {
$restore_timezone_row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT config_timezone FROM settings WHERE company_id = 1"));
} catch (Throwable $e) {
$restore_timezone_row = null;
}
if (!empty($restore_timezone_row['config_timezone'])) {
require_once "../includes/inc_set_timezone.php";
}
require_once "../functions.php";
$options = getopt("", ["file:", "key:", "inspect", "yes", "help"]);
@@ -90,7 +101,7 @@ if (isset($options['inspect'])) {
exit(0);
}
if ($meta['database_version'] !== 'Unknown' && version_compare($meta['database_version'], $current_db_version, '>')) {
if ($meta['database_version'] !== 'Unknown' && $current_db_version !== 'Unknown' && version_compare($meta['database_version'], $current_db_version, '>')) {
echo "\nWARNING: this backup is from a NEWER database version than the code in this directory.\n";
echo "Update ITFlow to a matching version before restoring, or the app will error after the restore.\n";
}