no need to make call for guests

v1.18.x
barisusakli 10 years ago
parent 2e04501224
commit 646c5705cf

@ -140,6 +140,7 @@ define('forum/topic/posts', [
pids.push(posts[i].pid); pids.push(posts[i].pid);
} }
if (app.user.uid) {
socket.emit('posts.getPrivileges', pids, function(err, privileges) { socket.emit('posts.getPrivileges', pids, function(err, privileges) {
if(err) { if(err) {
return app.alertError(err.message); return app.alertError(err.message);
@ -149,6 +150,11 @@ define('forum/topic/posts', [
toggleModTools(pids[i], privileges[i]); toggleModTools(pids[i], privileges[i]);
} }
}); });
} else {
for(i=0; i<pids.length; ++i) {
toggleModTools(pids[i], {editable:false, move: false});
}
}
Posts.processPage(html); Posts.processPage(html);
} }

Loading…
Cancel
Save