X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Fduepuntozero%2Fstyle.php;h=1ef97db751e77b80eef48b44488725aa3bbb5837;hb=46b1b66dbf942ed2e34a493573020686c3e6b31c;hp=89f44d9c0454b3e6c7e05d6b5c86bb4c9c44f705;hpb=8ec424325375aa923c7d2d78ac8ddcc352f09cff;p=friendica.git diff --git a/view/theme/duepuntozero/style.php b/view/theme/duepuntozero/style.php index 89f44d9c04..1ef97db751 100644 --- a/view/theme/duepuntozero/style.php +++ b/view/theme/duepuntozero/style.php @@ -1,29 +1,64 @@ . + * + */ + +use Friendica\DI; + +if (file_exists("$THEMEPATH/style.css")) { + echo file_get_contents("$THEMEPATH/style.css"); } -$uid = get_theme_uid(); -$s_colorset = get_config('duepuntozero','colorset'); -$colorset = get_pconfig( $uid, 'duepuntozero', 'colorset'); -if (!x($colorset)) - $colorset = $s_colorset; +/* + * 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'); + 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'); + } } echo $setcss; - -?>