From 321527946a1e890c7a03f71e05ec3d0ca55a81f3 Mon Sep 17 00:00:00 2001 From: James Manuel Date: Mon, 8 Jun 2026 15:52:06 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20make=20EuroOffice=20the=20d?= =?UTF-8?q?efault=20editor=20for=20new=20and=20existing=20installs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - isEuroofficeEnabled default: false → true - isCollaboraEnabled default: true → false - Add eurooffice to STARTUP_APPS so it installs automatically - performMigrations(): one-time migration (guarded by eurooffice_default_migration_v1 flag) that forces existing installs to switch to EuroOffice on next mastercontainer start, overriding any prior explicit editor choice - Call performMigrations() at index.php bootstrap Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: James Manuel --- php/public/index.php | 1 + php/src/Data/ConfigurationManager.php | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index 182ef889..25801f58 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -25,6 +25,7 @@ use Psr\Http\Message\ServerRequestInterface as Request; require __DIR__ . '/../vendor/autoload.php'; $container = \AIO\DependencyInjection::GetContainer(); +$container->get(\AIO\Data\ConfigurationManager::class)->performMigrations(); $dataConst = $container->get(\AIO\Data\DataConst::class); // Create app diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 6a6556ec..b930a9d3 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -100,13 +100,14 @@ class ConfigurationManager } public bool $isEuroofficeEnabled { - get => $this->get('isEuroofficeEnabled', false); + // Type-cast because old configs could have 1/0 for this key. + get => (bool) $this->get('isEuroofficeEnabled', true); set { $this->set('isEuroofficeEnabled', $value); } } public bool $isCollaboraEnabled { // Type-cast because old configs could have 1/0 for this key. - get => (bool) $this->get('isCollaboraEnabled', true); + get => (bool) $this->get('isCollaboraEnabled', false); set { $this->set('isCollaboraEnabled', $value); } } @@ -927,7 +928,16 @@ class ConfigurationManager if (is_string($apps)) { return trim($apps); } - return 'deck twofactor_totp tasks calendar contacts notes'; + return 'deck twofactor_totp tasks calendar contacts notes eurooffice'; + } + + public function performMigrations(): void { + if (!$this->get('eurooffice_default_migration_v1', false)) { + $this->isCollaboraEnabled = false; + $this->isOnlyofficeEnabled = false; + $this->isEuroofficeEnabled = true; + $this->set('eurooffice_default_migration_v1', true); + } } /**