Add more references to theme.php

This commit is contained in:
Hypolite Petovan 2020-08-19 22:54:12 -04:00
parent d5975ff0bc
commit 91a1e5df91
4 changed files with 11 additions and 10 deletions

View file

@ -32,19 +32,17 @@ class Theme extends BaseModule
{ {
public static function rawContent(array $parameters = []) 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) { if (file_exists("view/theme/$theme/theme.php")) {
$theme = $a->argv[2]; require_once "view/theme/$theme/theme.php";
$theme = Strings::sanitizeFilePathItem($theme); }
// set the path for later use in the theme styles // set the path for later use in the theme styles
$THEMEPATH = "view/theme/$theme"; if (file_exists("view/theme/$theme/style.php")) {
if (file_exists("view/theme/$theme/style.php")) { require_once "view/theme/$theme/style.php";
require_once("view/theme/$theme/style.php");
}
} }
exit(); exit();

View file

@ -129,6 +129,7 @@ function theme_admin(App $a)
function frio_form($arr) function frio_form($arr)
{ {
require_once 'view/theme/frio/php/scheme.php'; require_once 'view/theme/frio/php/scheme.php';
require_once 'view/theme/frio/theme.php';
$scheme_info = get_scheme_info($arr['scheme']); $scheme_info = get_scheme_info($arr['scheme']);
$disable = $scheme_info['overwrites']; $disable = $scheme_info['overwrites'];

View file

@ -27,6 +27,7 @@
use Friendica\DI; use Friendica\DI;
use Friendica\Model\Profile; use Friendica\Model\Profile;
require_once 'view/theme/frio/theme.php';
require_once 'view/theme/frio/php/frio_boot.php'; require_once 'view/theme/frio/php/frio_boot.php';
// $minimal = is_modal(); // $minimal = is_modal();

View file

@ -22,6 +22,7 @@
use Friendica\DI; use Friendica\DI;
use Friendica\Util\Strings; use Friendica\Util\Strings;
require_once 'view/theme/frio/theme.php';
require_once 'view/theme/frio/php/PHPColors/Color.php'; require_once 'view/theme/frio/php/PHPColors/Color.php';
$scheme = ''; $scheme = '';