X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FTheme.php;h=63004c9280af062799e7c4d27f38acc01ca0cb58;hb=1792046a4f270f15d904d591c1e9eb0444ff2349;hp=e9ce8d396f239cf63d9becfc4e91105ef39c0f4b;hpb=f2c31ef1c0e92208b58d22791fc72d0ad3e3d6ae;p=friendica.git diff --git a/src/Module/Theme.php b/src/Module/Theme.php index e9ce8d396f..63004c9280 100644 --- a/src/Module/Theme.php +++ b/src/Module/Theme.php @@ -1,8 +1,28 @@ . + * + */ namespace Friendica\Module; use Friendica\BaseModule; +use Friendica\DI; use Friendica\Util\Strings; /** @@ -12,19 +32,18 @@ class Theme extends BaseModule { public static function rawContent(array $parameters = []) { - header("Content-Type: text/css"); + header('Content-Type: text/css'); - $a = self::getApp(); + $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 + $THEMEPATH = "view/theme/$theme"; + if (file_exists("view/theme/$theme/style.php")) { + require_once "view/theme/$theme/style.php"; } exit();