X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Fvier%2Fstyle.php;h=74975893ce8ac6d17a288a2562d94ee58f6cfdad;hb=59268c600cc93591006b7f0f0e9de3a0344e7d4f;hp=909a27fc6cbb06135e03ce39624b41691a8f600a;hpb=4a0127bceef8784bab62ce661b73f7bc8bf5ef8b;p=friendica.git diff --git a/view/theme/vier/style.php b/view/theme/vier/style.php index 909a27fc6c..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 = ''; @@ -49,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);