X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=Civi%2FCore%2FThemes.php;h=8e7dc5988dc4e81904cd713ee6776b22f9b05c58;hb=290207d6186c9fc08f2125adcc92ca88871a541d;hp=0413fde1a9f300c1c2d66b9ac456b3fe9f952b56;hpb=a172b9df71d23531da182325683b4518b63882ea;p=civicrm-core.git diff --git a/Civi/Core/Themes.php b/Civi/Core/Themes.php index 0413fde1a9..8e7dc5988d 100644 --- a/Civi/Core/Themes.php +++ b/Civi/Core/Themes.php @@ -1,27 +1,11 @@ activeThemeKey === NULL) { // Ambivalent: is it better to use $config->userFrameworkFrontend or $template->get('urlIsPublic')? $config = \CRM_Core_Config::singleton(); - $settingKey = $config->userFrameworkFrontend ? 'theme_frontend' : 'theme_backend'; + $settingKey = $config->userSystem->isFrontEndPage() ? 'theme_frontend' : 'theme_backend'; $themeKey = Civi::settings()->get($settingKey); if ($themeKey === 'default') { @@ -94,7 +78,7 @@ class Themes { \CRM_Utils_Hook::activeTheme($themeKey, [ 'themes' => $this, - 'page' => \CRM_Utils_Array::value(\CRM_Core_Config::singleton()->userFrameworkURLVar, $_GET), + 'page' => \CRM_Utils_System::currentPath(), ]); $themes = $this->getAll(); @@ -113,7 +97,7 @@ class Themes { */ public function get($themeKey) { $all = $this->getAll(); - return isset($all[$themeKey]) ? $all[$themeKey] : NULL; + return $all[$themeKey] ?? NULL; } /**