]> git.mxchange.org Git - friendica.git/commitdiff
Add more references to theme.php
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 20 Aug 2020 02:54:12 +0000 (22:54 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 20 Aug 2020 02:54:12 +0000 (22:54 -0400)
src/Module/Theme.php
view/theme/frio/config.php
view/theme/frio/php/default.php
view/theme/frio/style.php

index c904f1defd1848e8fd8f08a7ac45c016393f349e..87aa8deddaaea584db17b19544e6d1daafd9aaa7 100644 (file)
@@ -32,19 +32,17 @@ class Theme extends BaseModule
 {
        public static function rawContent(array $parameters = [])
        {
-               header("Content-Type: text/css");
+               header('Content-Type: text/css');
 
-               $a = DI::app();
+               $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
+               if (file_exists("view/theme/$theme/style.php")) {
+                       require_once "view/theme/$theme/style.php";
                }
 
                exit();
index 57417af055b8adf2f80cc588c830e7dd6f2a6f9d..64809f399bf596f69b62435247528368693e2a30 100644 (file)
@@ -129,6 +129,7 @@ function theme_admin(App $a)
 function frio_form($arr)
 {
        require_once 'view/theme/frio/php/scheme.php';
+       require_once 'view/theme/frio/theme.php';
 
        $scheme_info = get_scheme_info($arr['scheme']);
        $disable = $scheme_info['overwrites'];
index bd5ef7f3ff3318b8ebb036d5bb7c308cf038750e..7cbfdacfe75b5971329e778913d3ca75949864e1 100644 (file)
@@ -27,6 +27,7 @@
 use Friendica\DI;
 use Friendica\Model\Profile;
 
+require_once 'view/theme/frio/theme.php';
 require_once 'view/theme/frio/php/frio_boot.php';
 
 //     $minimal = is_modal();
index dadd04580554cb43d6a9f7f4d4bea71f3a186b49..99e705a9614e37b3d820d55370997e83465341c0 100644 (file)
@@ -22,6 +22,7 @@
 use Friendica\DI;
 use Friendica\Util\Strings;
 
+require_once 'view/theme/frio/theme.php';
 require_once 'view/theme/frio/php/PHPColors/Color.php';
 
 $scheme = '';