Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CRM/Upgrade/Incremental/php/SixZero.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}

}
4 changes: 2 additions & 2 deletions settings/Core.setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@
'pseudoconstant' => array(
'callback' => 'call://themes/getAvailable',
),
'default' => 'default',
'default' => 'minetta',
'add' => '5.16',
'title' => ts('Frontend Theme'),
'is_domain' => 1,
Expand All @@ -1209,7 +1209,7 @@
'pseudoconstant' => array(
'callback' => 'call://themes/getAvailable',
),
'default' => 'default',
'default' => 'minetta',
'add' => '5.16',
'title' => ts('Backend Theme'),
'is_domain' => 1,
Expand Down
1 change: 1 addition & 0 deletions setup/plugins/init/DefaultExtensions.civi-setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
$e->getModel()->extensions[] = 'authx';
$e->getModel()->extensions[] = 'civiimport';
$e->getModel()->extensions[] = 'message_admin';
$e->getModel()->extensions[] = 'riverlea';

});