From 17bef5bff93c6762f903bbc81ac7c6ba7c20a9be Mon Sep 17 00:00:00 2001 From: benjamin Date: Fri, 7 Feb 2025 10:18:09 +0000 Subject: [PATCH 1/3] Riverlea rollout - enable Riverlea ext by default from 6.0 --- CRM/Upgrade/Incremental/php/SixZero.php | 1 + setup/plugins/init/DefaultExtensions.civi-setup.php | 1 + 2 files changed, 2 insertions(+) diff --git a/CRM/Upgrade/Incremental/php/SixZero.php b/CRM/Upgrade/Incremental/php/SixZero.php index d5436d763254..825629a78758 100644 --- a/CRM/Upgrade/Incremental/php/SixZero.php +++ b/CRM/Upgrade/Incremental/php/SixZero.php @@ -44,6 +44,7 @@ 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']); } public static function migrateFromEmailAddressValues($rev): bool { 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'; }); From 3f905941d15fff05263f0e09720906c796df6384 Mon Sep 17 00:00:00 2001 From: benjamin Date: Fri, 7 Feb 2025 10:19:20 +0000 Subject: [PATCH 2/3] Riverlea rollout - freeze upgrading sites with Automatic to Greenwich --- CRM/Upgrade/Incremental/php/SixZero.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CRM/Upgrade/Incremental/php/SixZero.php b/CRM/Upgrade/Incremental/php/SixZero.php index 825629a78758..38ae9ece6813 100644 --- a/CRM/Upgrade/Incremental/php/SixZero.php +++ b/CRM/Upgrade/Incremental/php/SixZero.php @@ -45,6 +45,7 @@ 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 { @@ -113,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; + } + } From 8485364a1f87f302e4a23339affab019394cb991 Mon Sep 17 00:00:00 2001 From: benjamin Date: Fri, 7 Feb 2025 10:20:43 +0000 Subject: [PATCH 3/3] Riverlea rollout - make Minetta the default for theme settings --- settings/Core.setting.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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,