]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Theme.php
Use centralized function to fetch query results
[friendica.git] / src / Module / Theme.php
index 87aa8deddaaea584db17b19544e6d1daafd9aaa7..66c9d06f076bad857b4a3279bb16e708cd961478 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -30,17 +30,18 @@ use Friendica\Util\Strings;
  */
 class Theme extends BaseModule
 {
-       public static function rawContent(array $parameters = [])
+       protected function rawContent(array $request = [])
        {
                header('Content-Type: text/css');
 
-               $theme = Strings::sanitizeFilePathItem($parameters['theme']);
+               $theme = Strings::sanitizeFilePathItem($this->parameters['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";
                }