upgraded categories to sorted set, score is the order set from acp, check if category topic exists before posting

This commit is contained in:
Baris Soner Usakli
2014-02-22 18:56:37 -05:00
parent d6d9776cde
commit 6e5a6b8784
9 changed files with 129 additions and 56 deletions

View File

@@ -2,9 +2,14 @@ var Groups = require('./groups'),
User = require('./user'),
async = require('async'),
db = require('./database'),
CategoryTools = {};
CategoryTools.exists = function(cid, callback) {
db.isSortedSetMember('categories:cid', cid, callback);
};
CategoryTools.privileges = function(cid, uid, callback) {
async.parallel({
"+r": function(next) {