|
|
@ -82,7 +82,6 @@ module.exports = function(Topics) {
|
|
|
|
return callback(new Error('[[error:title-too-long, ' + meta.config.maximumTitleLength + ']]'));
|
|
|
|
return callback(new Error('[[error:title-too-long, ' + meta.config.maximumTitleLength + ']]'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var categoryPrivileges;
|
|
|
|
|
|
|
|
async.waterfall([
|
|
|
|
async.waterfall([
|
|
|
|
function(next) {
|
|
|
|
function(next) {
|
|
|
|
categoryTools.exists(cid, next);
|
|
|
|
categoryTools.exists(cid, next);
|
|
|
@ -94,7 +93,6 @@ module.exports = function(Topics) {
|
|
|
|
categoryTools.privileges(cid, uid, next);
|
|
|
|
categoryTools.privileges(cid, uid, next);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
function(privileges, next) {
|
|
|
|
function(privileges, next) {
|
|
|
|
categoryPrivileges = privileges;
|
|
|
|
|
|
|
|
if(!privileges.write) {
|
|
|
|
if(!privileges.write) {
|
|
|
|
return next(new Error('[[error:no-privileges]]'));
|
|
|
|
return next(new Error('[[error:no-privileges]]'));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -125,7 +123,6 @@ module.exports = function(Topics) {
|
|
|
|
topicData.unreplied = 1;
|
|
|
|
topicData.unreplied = 1;
|
|
|
|
|
|
|
|
|
|
|
|
next(null, {
|
|
|
|
next(null, {
|
|
|
|
privileges: categoryPrivileges,
|
|
|
|
|
|
|
|
topicData: topicData,
|
|
|
|
topicData: topicData,
|
|
|
|
postData: postData
|
|
|
|
postData: postData
|
|
|
|
});
|
|
|
|
});
|
|
|
|