From a8786cbe9dc33b4ba73dbb06be342c61d589702a Mon Sep 17 00:00:00 2001 From: sajotrei <75281007+sajotrei@users.noreply.github.com> Date: Mon, 24 Aug 2026 11:44:29 +0200 Subject: [PATCH] Redirect after completed updates --- include/init/update.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/init/update.php b/include/init/update.php index 6cdad30ec..e651a3148 100755 --- a/include/init/update.php +++ b/include/init/update.php @@ -204,6 +204,9 @@ } // Update completed elseif (Update::isUpdateCompleted()) { + $postUpdateUrl = base_path_osm().'/index.php'; + $autoRedirect = (($_GET['firstuse'] ?? '') !== 'true') ? 'true' : 'false'; + Update::updateCleanup(); echo ' @@ -216,7 +219,13 @@ // Mostra tutti i segni di spunta per gli aggiornamenti completati $("#updates-list .fa-check").show(); - $("#versions-details-container").after(\'
'.tr('Configura il gestionale').'
\'); + var postUpdateUrl = '.json_encode($postUpdateUrl).'; + $("#versions-details-container").after(\'
'.tr('Configura il gestionale').'
\'); + if ('.$autoRedirect.') { + setTimeout(function() { + window.location.href = postUpdateUrl; + }, 1200); + } '; // Instructions for the first installation