|
|
@ -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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|