]> git.mxchange.org Git - friendica.git/blob - mod/view.php
Merge pull request #6977 from annando/fix-reshare
[friendica.git] / mod / view.php
1 <?php
2
3 use Friendica\App;
4 use Friendica\Util\Strings;
5
6 /**
7  * load view/theme/$current_theme/style.php with friendica context
8  *
9  * @param App $a
10  */
11 function view_init(App $a)
12 {
13         header("Content-Type: text/css");
14
15         if ($a->argc == 4) {
16                 $theme = $a->argv[2];
17                 $theme = Strings::sanitizeFilePathItem($theme);
18
19                 // set the path for later use in the theme styles
20                 $THEMEPATH = "view/theme/$theme";
21                 if (file_exists("view/theme/$theme/style.php")) {
22                         require_once("view/theme/$theme/style.php");
23                 }
24         }
25
26         exit();
27 }