diff --git a/src/Module/Theme.php b/src/Module/Theme.php index c904f1defd..87aa8dedda 100644 --- a/src/Module/Theme.php +++ b/src/Module/Theme.php @@ -32,19 +32,17 @@ class Theme extends BaseModule { public static function rawContent(array $parameters = []) { - header("Content-Type: text/css"); + header('Content-Type: text/css'); - $a = DI::app(); + $theme = Strings::sanitizeFilePathItem($parameters['theme']); - if ($a->argc == 4) { - $theme = $a->argv[2]; - $theme = Strings::sanitizeFilePathItem($theme); + if (file_exists("view/theme/$theme/theme.php")) { + require_once "view/theme/$theme/theme.php"; + } - // set the path for later use in the theme styles - $THEMEPATH = "view/theme/$theme"; - if (file_exists("view/theme/$theme/style.php")) { - require_once("view/theme/$theme/style.php"); - } + // set the path for later use in the theme styles + if (file_exists("view/theme/$theme/style.php")) { + require_once "view/theme/$theme/style.php"; } exit(); diff --git a/view/theme/frio/config.php b/view/theme/frio/config.php index 57417af055..64809f399b 100644 --- a/view/theme/frio/config.php +++ b/view/theme/frio/config.php @@ -129,6 +129,7 @@ function theme_admin(App $a) function frio_form($arr) { require_once 'view/theme/frio/php/scheme.php'; + require_once 'view/theme/frio/theme.php'; $scheme_info = get_scheme_info($arr['scheme']); $disable = $scheme_info['overwrites']; diff --git a/view/theme/frio/php/default.php b/view/theme/frio/php/default.php index bd5ef7f3ff..7cbfdacfe7 100644 --- a/view/theme/frio/php/default.php +++ b/view/theme/frio/php/default.php @@ -27,6 +27,7 @@ use Friendica\DI; use Friendica\Model\Profile; +require_once 'view/theme/frio/theme.php'; require_once 'view/theme/frio/php/frio_boot.php'; // $minimal = is_modal(); diff --git a/view/theme/frio/style.php b/view/theme/frio/style.php index dadd045805..99e705a961 100644 --- a/view/theme/frio/style.php +++ b/view/theme/frio/style.php @@ -22,6 +22,7 @@ use Friendica\DI; use Friendica\Util\Strings; +require_once 'view/theme/frio/theme.php'; require_once 'view/theme/frio/php/PHPColors/Color.php'; $scheme = '';