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 @@ -38,6 +38,8 @@ public function upgrade_6_0_alpha1($rev): void {
FALSE
);
$this->addTask('Set a default activity priority', 'addActivityPriorityDefault');
$this->addTask('Freeze theme choice to Greenwich', 'freezeDefaultThemeToGreenwich');
$this->addExtensionTask('Enable Riverlea extension', ['riverlea']);
}

/**
Expand Down Expand Up @@ -69,4 +71,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;
}

}
9 changes: 2 additions & 7 deletions Civi/Core/Themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
class Themes extends \Civi\Core\Service\AutoService {

/**
* The "default" theme adapts based on the latest recommendation from civicrm.org
* The "default" theme adapts based on the latest recommendation
* by switching to DEFAULT_THEME at runtime.
*/
const DEFAULT_THEME = 'greenwich';
const DEFAULT_THEME = 'minetta';

/**
* Fallback is a pseudotheme which can be included in "search_order".
Expand Down Expand Up @@ -202,11 +202,6 @@ protected function buildAll() {
'help' => ts('Determine a system default automatically'),
// This is an alias. url_callback, search_order don't matter.
],
'greenwich' => [
'ext' => 'civicrm',
'title' => 'Greenwich',
'help' => ts('CiviCRM 4.x look-and-feel'),
],
'none' => [
'ext' => 'civicrm',
'title' => ts('None (Unstyled)'),
Expand Down
3 changes: 0 additions & 3 deletions ext/greenwich/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
</urls>
<releaseDate>[civicrm.releaseDate]</releaseDate>
<version>[civicrm.version]</version>
<tags>
<tag>mgmt:hidden</tag>
</tags>
<develStage>stable</develStage>
<compatibility>
<ver>[civicrm.majorVersion]</ver>
Expand Down
3 changes: 3 additions & 0 deletions ext/riverlea/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
<compatibility>
<ver>[civicrm.majorVersion]</ver>
</compatibility>
<tags>
<tag>mgmt:required</tag>
</tags>
<comments>A cross-CMS CiviCRM theme framework.</comments>
<classloader>
<psr4 prefix="Civi\" path="Civi"/>
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';

});