correction to add support to custom settings

This commit is contained in:
antil0pa 2018-11-30 14:45:27 +01:00
parent b4a7e68c88
commit ef0c28f9ec
2 changed files with 11 additions and 11 deletions

View File

@ -87,7 +87,7 @@ class BeetrootConfig {
function form($arr) {
if(feature_enabled(local_channel(),'advanced_theming'))
if(get_pconfig(local_channel(), 'redbasic','advanced_theming'))
$expert = 1;

View File

@ -45,13 +45,13 @@ if($_REQUEST['schema']) {
if (($schema) && ($schema != '---')) {
// Check it exists, because this setting gets distributed to clones
if(file_exists('view/theme/beetroot/schema/' . $schema . '.php')) {
$schemefile = 'view/theme/beetroot/schema/' . $schema . '.php';
if(file_exists('view/theme/redbasic/schema/' . $schema . '.php')) {
$schemefile = 'view/theme/redbasic/schema/' . $schema . '.php';
require_once ($schemefile);
}
if(file_exists('view/theme/beetroot/schema/' . $schema . '.css')) {
$schemecss = file_get_contents('view/theme/beetroot/schema/' . $schema . '.css');
if(file_exists('view/theme/redbasic/schema/' . $schema . '.css')) {
$schemecss = file_get_contents('view/theme/redbasic/schema/' . $schema . '.css');
}
}
@ -60,13 +60,13 @@ if (($schema) && ($schema != '---')) {
// default.php and default.css MUST be symlinks to existing schema files in view/theme/redbasic/schema
if ((!$schema) || ($schema == '---')) {
if(file_exists('view/theme/beetroot/schema/default.php')) {
$schemefile = 'view/theme/beetroot/schema/default.php';
if(file_exists('view/theme/redbasic/schema/default.php')) {
$schemefile = 'view/theme/redbasic/schema/default.php';
require_once ($schemefile);
}
if(file_exists('view/theme/beetroot/schema/default.css')) {
$schemecss = file_get_contents('view/theme/beetroot/schema/default.css');
if(file_exists('view/theme/redbasic/schema/default.css')) {
$schemecss = file_get_contents('view/theme/redbasic/schema/default.css');
}
}
@ -115,7 +115,7 @@ if(file_exists('view/theme/redbasic/css/style.css')) {
$x = file_get_contents('view/theme/redbasic/css/style.css');
$x .= file_get_contents('view/theme/beetroot/css/style.css');
$x .= file_get_contents('view/theme/redbasic/css/style.css');
if($narrow_navbar && file_exists('view/theme/redbasic/css/narrow_navbar.css')) {
$x .= file_get_contents('view/theme/redbasic/css/narrow_navbar.css');
@ -168,4 +168,4 @@ if(file_exists('view/theme/redbasic/css/style.css')) {
//if(local_channel() && App::$channel && App::$channel['channel_theme'] != 'redbasic')
// set_pconfig(local_channel(), 'redbasic', 'schema', '---');
echo @file_get_contents('view/theme/beetroot/css/style.css');
echo @file_get_contents('extend/theme/beetroot/css/style.css');