|
|
@ -1,17 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
|
|
var async = require('async'),
|
|
|
|
var async = require('async');
|
|
|
|
winston = require('winston'),
|
|
|
|
|
|
|
|
|
|
|
|
var meta = require('../meta');
|
|
|
|
meta = require('../meta'),
|
|
|
|
var posts = require('../posts');
|
|
|
|
posts = require('../posts'),
|
|
|
|
var topics = require('../topics');
|
|
|
|
topics = require('../topics'),
|
|
|
|
var user = require('../user');
|
|
|
|
user = require('../user'),
|
|
|
|
var helpers = require('./helpers');
|
|
|
|
helpers = require('./helpers'),
|
|
|
|
var plugins = require('../plugins');
|
|
|
|
groups = require('../groups'),
|
|
|
|
|
|
|
|
categories = require('../categories'),
|
|
|
|
|
|
|
|
plugins = require('../plugins');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = function(privileges) {
|
|
|
|
module.exports = function(privileges) {
|
|
|
|
|
|
|
|
|
|
|
@ -170,15 +167,6 @@ module.exports = function(privileges) {
|
|
|
|
], callback);
|
|
|
|
], callback);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function isPostTopicLocked(pid, callback) {
|
|
|
|
|
|
|
|
posts.getPostField(pid, 'tid', function(err, tid) {
|
|
|
|
|
|
|
|
if (err) {
|
|
|
|
|
|
|
|
return callback(err);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
topics.isLocked(tid, callback);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function isAdminOrMod(pid, uid, callback) {
|
|
|
|
function isAdminOrMod(pid, uid, callback) {
|
|
|
|
helpers.some([
|
|
|
|
helpers.some([
|
|
|
|
function(next) {
|
|
|
|
function(next) {
|
|
|
|