From e7801501b1125165eb55b0dde1cd9f5fb8c9c42c Mon Sep 17 00:00:00 2001
From: anonymoususer72041
<247563575+anonymoususer72041@users.noreply.github.com>
Date: Tue, 23 Jun 2026 15:23:08 +0200
Subject: [PATCH 1/5] Route existing installations through maintenance
---
installwizard.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/installwizard.php b/installwizard.php
index b59c6e9a7..760b37d3a 100755
--- a/installwizard.php
+++ b/installwizard.php
@@ -401,7 +401,7 @@
If you choose to use the existing OpenCATS installation, you can always run
the installer again later and choose a different option.
-
+
Loading Data - Restore from Backup
From 09bad52d71ebbc1b238eb97f390af622c0d94e12 Mon Sep 17 00:00:00 2001
From: anonymoususer72041
<247563575+anonymoususer72041@users.noreply.github.com>
Date: Tue, 23 Jun 2026 15:23:22 +0200
Subject: [PATCH 2/5] Add existing-installation maintenance flow
---
js/install.js | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/js/install.js b/js/install.js
index 1cbd2cf02..54546e3fa 100755
--- a/js/install.js
+++ b/js/install.js
@@ -28,6 +28,7 @@
var response;
var maxSteps;
+var installMaintNextAction = "a=reindexResumes";
function setActiveStep(step)
@@ -121,7 +122,8 @@ function Installpage_maint()
if (response.indexOf("setProgressUpdating") == -1)
{
- Installpage_populate("a=reindexResumes");
+ Installpage_populate(installMaintNextAction);
+ installMaintNextAction = "a=reindexResumes";
}
else
{
@@ -141,6 +143,18 @@ function Installpage_maint()
);
}
+function Installpage_upgradeExisting()
+{
+ Installpage_populate("a=upgradeExisting");
+}
+
+function Installpage_upgradeExistingMaint()
+{
+ /* Existing installations must run schema maintenance before later installer questions. */
+ installMaintNextAction = "a=upgradeExistingMaintComplete";
+ Installpage_maint();
+}
+
function Installpage_append(postData, message)
{
var htmlObjectID = "subFormBlock";
From e4341b0ed42b4cdfe77c1d7b410bb9c1830b09c4 Mon Sep 17 00:00:00 2001
From: anonymoususer72041
<247563575+anonymoususer72041@users.noreply.github.com>
Date: Tue, 23 Jun 2026 15:23:45 +0200
Subject: [PATCH 3/5] Resume installer questions after existing upgrade
migrations
---
modules/install/ajax/ui.php | 51 +++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/modules/install/ajax/ui.php b/modules/install/ajax/ui.php
index cc601d92f..737b03fbd 100755
--- a/modules/install/ajax/ui.php
+++ b/modules/install/ajax/ui.php
@@ -679,6 +679,12 @@
break;
case 'resetDatabase':
+ @session_name(CATS_SESSION_NAME);
+ session_start();
+
+ unset($_SESSION['existingUpgradeMaintStarted']);
+ unset($_SESSION['existingUpgradeMaintComplete']);
+
MySQLConnect();
foreach ($tables as $table => $data)
@@ -971,6 +977,15 @@
@session_name(CATS_SESSION_NAME);
session_start();
+ if (isset($_SESSION['existingUpgradeMaintComplete']))
+ {
+ unset($_SESSION['existingUpgradeMaintStarted']);
+ unset($_SESSION['existingUpgradeMaintComplete']);
+
+ echo '';
+ break;
+ }
+
if (isset($_SESSION['CATS']))
{
unset($_SESSION['CATS']);
@@ -987,6 +1002,42 @@
';
break;
+ case 'upgradeExisting':
+ @session_name(CATS_SESSION_NAME);
+ session_start();
+
+ $_SESSION['existingUpgradeMaintStarted'] = true;
+ unset($_SESSION['existingUpgradeMaintComplete']);
+
+ if (isset($_SESSION['CATS']))
+ {
+ unset($_SESSION['CATS']);
+ }
+
+ if (isset($_SESSION['modules']))
+ {
+ unset($_SESSION['modules']);
+ }
+
+ echo '';
+ break;
+
+ case 'upgradeExistingMaintComplete':
+ @session_name(CATS_SESSION_NAME);
+ session_start();
+
+ if (isset($_SESSION['existingUpgradeMaintStarted']))
+ {
+ $_SESSION['existingUpgradeMaintComplete'] = true;
+ unset($_SESSION['existingUpgradeMaintStarted']);
+ }
+
+ echo '';
+ break;
+
case 'reindexResumes':
echo '