fix: #7266 body does not contain skin class

A regression was identified where the skin was not shown in the
body class. This resolves the issue and adds a workaround so that
the fix does not become breaking for custom themes.
v1.18.x
Julian Lam 6 years ago
parent d928c54d0a
commit f122fc44d0

@ -140,7 +140,9 @@ module.exports = function (middleware) {
results.user['email:confirmed'] = results.user['email:confirmed'] === 1;
results.user.isEmailConfirmSent = !!results.isEmailConfirmSent;
templateValues.bootswatchSkin = parseInt(meta.config.disableCustomUserSkins, 10) !== 1 ? res.locals.config.bootswatchSkin || '' : '';
templateValues.bootswatchSkin = (parseInt(meta.config.disableCustomUserSkins, 10) !== 1 ? res.locals.config.bootswatchSkin : '') || meta.config.bootswatchSkin || '';
templateValues.config.bootswatchSkin = templateValues.bootswatchSkin || 'noskin'; // TODO remove in v1.12.0+
const unreadCounts = results.unreadData.counts;
var unreadCount = {
topic: unreadCounts[''] || 0,

Loading…
Cancel
Save