mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-06-10 08:37:02 +00:00
✨ feat: make EuroOffice the default editor for new and existing installs
- 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 <noreply@anthropic.com> Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user