diff --git a/CRM/Upgrade/Incremental/php/SixZero.php b/CRM/Upgrade/Incremental/php/SixZero.php index d5436d763254..38ae9ece6813 100644 --- a/CRM/Upgrade/Incremental/php/SixZero.php +++ b/CRM/Upgrade/Incremental/php/SixZero.php @@ -44,6 +44,8 @@ public function upgrade_6_0_alpha1($rev): void { ); $this->addTask('Set a default activity priority', 'addActivityPriorityDefault'); $this->addSimpleExtensionTask(ts('enable dedupe backward compatibility'), ['legacydedupefinder']); + $this->addExtensionTask('Enable Riverlea extension', ['riverlea']); + $this->addTask('Freeze theme choice to Greenwich', 'freezeDefaultThemeToGreenwich'); } public static function migrateFromEmailAddressValues($rev): bool { @@ -112,4 +114,25 @@ public static function addActivityPriorityDefault() { return TRUE; } + /** + * On 6.0 the default theme changes to Riverlea. + * + * For sites upgrading that have not made an explicit theme choice and have previously got + * Greenwich by default, change this to an explicit choice of Greenwich. + * + * @return bool + */ + public static function freezeDefaultThemeToGreenwich() { + $themeSettings = ['theme_backend', 'theme_frontend']; + + foreach ($themeSettings as $key) { + $value = \Civi::settings()->get($key); + if ($value === 'default') { + \Civi::settings()->set($key, 'greenwich'); + } + } + + return TRUE; + } + } diff --git a/settings/Core.setting.php b/settings/Core.setting.php index d604f723877d..a938b23ce5ea 100644 --- a/settings/Core.setting.php +++ b/settings/Core.setting.php @@ -1184,7 +1184,7 @@ 'pseudoconstant' => array( 'callback' => 'call://themes/getAvailable', ), - 'default' => 'default', + 'default' => 'minetta', 'add' => '5.16', 'title' => ts('Frontend Theme'), 'is_domain' => 1, @@ -1209,7 +1209,7 @@ 'pseudoconstant' => array( 'callback' => 'call://themes/getAvailable', ), - 'default' => 'default', + 'default' => 'minetta', 'add' => '5.16', 'title' => ts('Backend Theme'), 'is_domain' => 1, diff --git a/setup/plugins/init/DefaultExtensions.civi-setup.php b/setup/plugins/init/DefaultExtensions.civi-setup.php index fe7d6518f8f2..54505c5ae0c8 100644 --- a/setup/plugins/init/DefaultExtensions.civi-setup.php +++ b/setup/plugins/init/DefaultExtensions.civi-setup.php @@ -22,5 +22,6 @@ $e->getModel()->extensions[] = 'authx'; $e->getModel()->extensions[] = 'civiimport'; $e->getModel()->extensions[] = 'message_admin'; + $e->getModel()->extensions[] = 'riverlea'; });