v1.18.x
Barış Soner Uşaklı 8 years ago
parent 3ec2cf65d7
commit b64ba40c67

@ -64,10 +64,10 @@
"nodebb-plugin-soundpack-default": "1.0.0",
"nodebb-plugin-spam-be-gone": "0.5.0",
"nodebb-rewards-essentials": "0.0.9",
"nodebb-theme-lavender": "4.0.1",
"nodebb-theme-persona": "5.0.10",
"nodebb-theme-lavender": "4.0.2",
"nodebb-theme-persona": "5.0.11",
"nodebb-theme-slick": "1.1.0",
"nodebb-theme-vanilla": "6.0.6",
"nodebb-theme-vanilla": "6.0.7",
"nodebb-widget-essentials": "3.0.0",
"nodemailer": "2.6.4",
"nodemailer-sendmail-transport": "1.0.0",

@ -617,7 +617,7 @@
// Add directional code if necessary
adaptor.translate('[[language:dir]]', function (value) {
if (value) {
if (value && !$('html').attr('data-dir')) {
jQuery('html').css('direction', value).attr('data-dir', value);
}
});

@ -8,6 +8,7 @@ var user = require('../user');
var meta = require('../meta');
var plugins = require('../plugins');
var navigation = require('../navigation');
var translator = require('../translator');
var controllers = {
api: require('../controllers/api'),
@ -97,6 +98,11 @@ module.exports = function (middleware) {
}
db.get('uid:' + req.uid + ':confirm:email:sent', next);
},
languageDirection: function (next) {
translator.translate('[[language:dir]]', res.locals.config.userLang, function (translated) {
next(null, translated);
});
},
navigation: async.apply(navigation.get),
tags: async.apply(meta.tags.parse, req, res.locals.metaTags, res.locals.linkTags),
banned: async.apply(user.isBanned, req.uid),
@ -135,6 +141,7 @@ module.exports = function (middleware) {
templateValues.maintenanceHeader = parseInt(meta.config.maintenanceMode, 10) === 1 && !results.isAdmin;
templateValues.defaultLang = meta.config.defaultLang || 'en-GB';
templateValues.userLang = res.locals.config.userLang;
templateValues.languageDirection = results.languageDirection;
templateValues.privateUserInfo = parseInt(meta.config.privateUserInfo, 10) === 1;
templateValues.privateTagListing = parseInt(meta.config.privateTagListing, 10) === 1;

Loading…
Cancel
Save