Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(theming): enforce theme also for login
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux authored and backportbot[bot] committed Mar 27, 2025
commit 69274eba66e2faeef14b49fc5642f7a71a12e9d1
4 changes: 3 additions & 1 deletion core/templates/layout.guest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
<?php emit_script_loading_tags($_); ?>
<?php print_unescaped($_['headers']); ?>
</head>
<body id="<?php p($_['bodyid']);?>">
<body id="<?php p($_['bodyid']);?>" <?php foreach ($_['enabledThemes'] as $themeId) {
p("data-theme-$themeId ");
}?> data-themes="<?php p(join(',', $_['enabledThemes'])) ?>">
<?php include 'layout.noscript.warning.php'; ?>
<?php include 'layout.initial-state.php'; ?>
<div class="wrapper">
Expand Down
2 changes: 2 additions & 0 deletions lib/private/TemplateLayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ public function __construct($renderAs, $appId = '') {
if ($user) {
$userDisplayName = $user->getDisplayName();
}
$theme = $this->config->getSystemValueString('enforce_theme', '');
$this->assign('enabledThemes', $theme === '' ? [] : [$theme]);
$this->assign('user_displayname', $userDisplayName);
$this->assign('user_uid', \OC_User::getUser());
} elseif ($renderAs === TemplateResponse::RENDER_AS_PUBLIC) {
Expand Down
Loading