X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FTheme.php;h=fe532db4050b6db0c7b915e2497d07c4d41d6ce8;hb=3bca4fe2a64671d09e08346456cdfa6c12f996e9;hp=e9ce8d396f239cf63d9becfc4e91105ef39c0f4b;hpb=c961128416390dab45bd5bd88ec4bf7823394413;p=friendica.git diff --git a/src/Module/Theme.php b/src/Module/Theme.php index e9ce8d396f..fe532db405 100644 --- a/src/Module/Theme.php +++ b/src/Module/Theme.php @@ -1,8 +1,28 @@ . + * + */ namespace Friendica\Module; use Friendica\BaseModule; +use Friendica\Core\System; use Friendica\Util\Strings; /** @@ -10,23 +30,21 @@ 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 = self::getApp(); + $theme = Strings::sanitizeFilePathItem($this->parameters['theme']); - if ($a->argc == 4) { - $theme = $a->argv[2]; - $theme = Strings::sanitizeFilePathItem($theme); - - // 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"); - } + if (file_exists("view/theme/$theme/theme.php")) { + require_once "view/theme/$theme/theme.php"; } - exit(); + // 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"; + } + System::exit(); } }