X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Fduepuntozero%2Fstyle.php;h=575f0dff584f606c7f4894a4abf7483c33b622d2;hb=22c1cd3cd12d8a565c83249ccf691723a76a47bd;hp=d5f8696a793b525586d731fd1789a5122e37d66b;hpb=a7302daf96e37c0b6609e222419172150674a25a;p=friendica.git diff --git a/view/theme/duepuntozero/style.php b/view/theme/duepuntozero/style.php index d5f8696a79..575f0dff58 100644 --- a/view/theme/duepuntozero/style.php +++ b/view/theme/duepuntozero/style.php @@ -1,11 +1,64 @@ . + * + */ + +use Friendica\DI; + +if (file_exists("$THEMEPATH/style.css")) { + echo file_get_contents("$THEMEPATH/style.css"); +} + +/* + * This script can be included when the maintenance mode is on, which requires us to avoid any config call + */ +if (DI::mode()->has(\Friendica\App\Mode::MAINTENANCEDISABLED)) { + $s_colorset = DI::config()->get('duepuntozero', 'colorset'); + $colorset = DI::pConfig()->get($_REQUEST['puid'] ?? 0, 'duepuntozero', 'colorset', $s_colorset); +} + +$setcss = ''; + +if ($colorset) { + if ($colorset == 'greenzero') { + $setcss = file_get_contents('view/theme/duepuntozero/deriv/greenzero.css'); + } + + if ($colorset == 'purplezero') { + $setcss = file_get_contents('view/theme/duepuntozero/deriv/purplezero.css'); + } + + if ($colorset == 'easterbunny') { + $setcss = file_get_contents('view/theme/duepuntozero/deriv/easterbunny.css'); + } + + if ($colorset == 'darkzero') { + $setcss = file_get_contents('view/theme/duepuntozero/deriv/darkzero.css'); + } + + if ($colorset == 'comix') { + $setcss = file_get_contents('view/theme/duepuntozero/deriv/comix.css'); + } + + if ($colorset == 'slackr') { + $setcss = file_get_contents('view/theme/duepuntozero/deriv/slackr.css'); + } } -$s_colorset = get_config('duepuntozero','colorset'); -$uid = local_user(); -$colorset = get_pconfig( $uid, 'duepuntozero', 'colorset'); -if (!x($colorset)) - $colorset = $s_colorset; -?> +echo $setcss;