X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Fvier%2Fstyle.php;h=74975893ce8ac6d17a288a2562d94ee58f6cfdad;hb=07162e557db7447741b6bcfb71a3ccbb476aab43;hp=a1b492b95050afc7d8a854d276869265bbe14657;hpb=a497bd3a3daf7e47e98fee0af9384544d8f691b8;p=friendica.git diff --git a/view/theme/vier/style.php b/view/theme/vier/style.php index a1b492b950..74975893ce 100644 --- a/view/theme/vier/style.php +++ b/view/theme/vier/style.php @@ -1,6 +1,6 @@ get($uid, 'vier', 'style'); +/* + * This script can be included when the maintenance mode is on, which requires us to avoid any config call and + * use the following hardcoded default + */ +$style = 'plus'; -if (empty($style)) { - $style = DI::config()->get('vier', 'style'); -} +if (DI::mode()->has(\Friendica\App\Mode::MAINTENANCEDISABLED)) { + $uid = $_REQUEST['puid'] ?? 0; -if (empty($style)) { - $style = "plus"; + $style = DI::pConfig()->get($uid, 'vier', 'style', DI::config()->get('vier', 'style', $style)); } $stylecss = ''; @@ -48,8 +49,7 @@ foreach (['style', $style] as $file) { $modified = $stylemodified; } } else { - //TODO: use Logger::ERROR? - Logger::notice('Error: missing file: "' . $stylecssfile .'" (userid: '. $uid .')'); + Logger::warning('Missing CSS file', ['file' => $stylecssfile, 'uid' => $uid]); } } $modified = gmdate('r', $modified); @@ -67,8 +67,7 @@ if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && isset($_SERVER['HTTP_IF_NONE_MA stripslashes($_SERVER['HTTP_IF_NONE_MATCH'])); if (($cached_modified == $modified) && ($cached_etag == $etag)) { - header('HTTP/1.1 304 Not Modified'); - exit(); + throw new NotModifiedException(); } } echo $stylecss;