whitespace

This commit is contained in:
Mario Vavti 2015-06-06 15:51:15 +02:00
parent 1d80c33207
commit d60c2b1621

View File

@ -1,11 +1,13 @@
<?php
if(! $a->install) {
// Get the UID of the channel owner
$uid = get_theme_uid();
if($uid)
if($uid) {
load_pconfig($uid,'redbasic');
}
// Load the owners pconfig
$nav_bg = get_pconfig($uid, "redbasic", "nav_bg");
@ -46,18 +48,20 @@ if(! $a->install) {
// Setting $schema to '' wasn't working for some reason, so we'll check it's
// not --- like the mobile theme does instead.
// Allow layouts to over-ride the schema
if($_REQUEST['schema'])
if($_REQUEST['schema']) {
$schema = $_REQUEST['schema'];
}
if (($schema) && ($schema != '---')) {
// Check it exists, because this setting gets distributed to clones
if(file_exists('view/theme/redbasic/schema/' . $schema . '.php')) {
$schemefile = 'view/theme/redbasic/schema/' . $schema . '.php';
require_once ($schemefile);
}
if(file_exists('view/theme/redbasic/schema/' . $schema . '.css')) {
$schemecss = file_get_contents('view/theme/redbasic/schema/' . $schema . '.css');
}
@ -67,19 +71,20 @@ if(! $a->install) {
// If we haven't got a schema, load the default. We shouldn't touch this - we
// should leave it for admins to define for themselves.
if (! $schema) {
if(file_exists('view/theme/redbasic/schema/default.php')) {
$schemefile = 'view/theme/redbasic/schema/default.php';
require_once ($schemefile);
}
if(file_exists('view/theme/redbasic/schema/default.css')) {
$schemecss = file_get_contents('view/theme/redbasic/schema/default.css');
}
}
}
//Set some defaults - we have to do this after pulling owner settings, and we have to check for each setting
//individually. If we don't, we'll have problems if a user has set one, but not all options.
if (! $nav_bg)
$nav_bg = "#222";
if (! $nav_gradient_top)
@ -145,8 +150,8 @@ if(! $a->install) {
// Apply the settings
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/redbasic/css/style.css');
// left aside is 231px + converse width
$main_width = (231 + intval($converse_width));
@ -189,6 +194,7 @@ $options = array (
);
echo str_replace(array_keys($options), array_values($options), $x);
}
if($narrow_navbar && file_exists('view/theme/redbasic/css/narrow_navbar.css')) {