private plugin link fix

v1.18.x
barisusakli 10 years ago
parent 10928ed11b
commit 7f6518e4a6

@ -1,3 +1,6 @@
'use strict';
/* globals define, app, ajaxify */
define('forum/account/header', function() {
var AccountHeader = {};
@ -7,11 +10,12 @@ define('forum/account/header', function() {
};
function displayAccountMenus() {
$('.account-sub-links .plugin-link').each(function() {
var $this = $(this);
$this.toggleClass('hide', $this.hasClass('private'));
if (!app.user.uid || app.user.uid !== parseInt(ajaxify.variables.get('theirid'), 10)) {
$('.account-sub-links .plugin-link.private').each(function() {
$(this).addClass('hide');
});
}
}
function selectActivePill() {
$('.account-sub-links li').removeClass('active').each(function() {

@ -340,6 +340,7 @@ middleware.renderHeader = function(req, res, callback) {
return;
}
results.user.isAdmin = results.isAdmin || false;
results.user.uid = parseInt(results.user.uid, 10);
results.user['email:confirmed'] = parseInt(results.user['email:confirmed'], 10) === 1;
templateValues.browserTitle = results.title;

Loading…
Cancel
Save