X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=Civi%2FCore%2FThemes.php;h=dee905485fdc24c5576ba2fd2a4f8846531fe6d4;hb=95d9cb655144abe69ca3daef970f446d59cc85a2;hp=c3550bc63d30428fc4fbc97fac965e888453a3ba;hpb=b5b27619ebbff04079eddea91a31b42bbd8ca540;p=civicrm-core.git diff --git a/Civi/Core/Themes.php b/Civi/Core/Themes.php index c3550bc63d..dee905485f 100644 --- a/Civi/Core/Themes.php +++ b/Civi/Core/Themes.php @@ -78,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(); @@ -133,9 +133,9 @@ class Themes { * @see CRM_Utils_Hook::themes */ public function getAvailable() { - $result = array(); + $result = []; foreach ($this->getAll() as $key => $theme) { - if ($key{0} !== '_') { + if ($key[0] !== '_') { $result[$key] = $theme['title']; } } @@ -164,14 +164,14 @@ class Themes { public function resolveUrls($active, $cssExt, $cssFile) { $all = $this->getAll(); if (!isset($all[$active])) { - return array(); + return []; } $cssId = $this->cssId($cssExt, $cssFile); foreach ($all[$active]['search_order'] as $themeKey) { if (isset($all[$themeKey]['excludes']) && in_array($cssId, $all[$themeKey]['excludes'])) { - $result = array(); + $result = []; } else { $result = Civi\Core\Resolver::singleton()