no need to make call for guests

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

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

Loading…
Cancel
Save