]> git.mxchange.org Git - friendica.git/blob - src/Module/Theme.php
Added parameter to rawContent
[friendica.git] / src / Module / Theme.php
1 <?php
2
3 namespace Friendica\Module;
4
5 use Friendica\BaseModule;
6 use Friendica\Util\Strings;
7
8 /**
9  * load view/theme/$current_theme/style.php with friendica context
10  */
11 class Theme extends BaseModule
12 {
13         public static function rawContent($parameters)
14         {
15                 header("Content-Type: text/css");
16
17                 $a = self::getApp();
18
19                 if ($a->argc == 4) {
20                         $theme = $a->argv[2];
21                         $theme = Strings::sanitizeFilePathItem($theme);
22
23                         // set the path for later use in the theme styles
24                         $THEMEPATH = "view/theme/$theme";
25                         if (file_exists("view/theme/$theme/style.php")) {
26                                 require_once("view/theme/$theme/style.php");
27                         }
28                 }
29
30                 exit();
31         }
32 }