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

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

Loading…
Cancel
Save