X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FTheme.php;h=66c9d06f076bad857b4a3279bb16e708cd961478;hb=04505366217b3a9c00710321f4495da03f727d39;hp=cc8f914528afd07d5012fd6c55284425e81e79ca;hpb=1de3f186d79f3703850524c1d58c237be3eb25f3;p=friendica.git diff --git a/src/Module/Theme.php b/src/Module/Theme.php index cc8f914528..66c9d06f07 100644 --- a/src/Module/Theme.php +++ b/src/Module/Theme.php @@ -1,4 +1,23 @@ . + * + */ namespace Friendica\Module; @@ -11,21 +30,20 @@ use Friendica\Util\Strings; */ class Theme extends BaseModule { - public static function rawContent(array $parameters = []) + protected function rawContent(array $request = []) { - header("Content-Type: text/css"); + header('Content-Type: text/css'); - $a = DI::app(); + $theme = Strings::sanitizeFilePathItem($this->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 + $THEMEPATH = "view/theme/$theme"; + if (file_exists("view/theme/$theme/style.php")) { + require_once "view/theme/$theme/style.php"; } exit();