Node.js based forum software built for the modern web
remove unused methods
Baris Usaklibaf91089a6fe
diff --git a/src/categories.js b/src/categories.jsindex 93d2c87e54..388414f54f 100644--- a/src/categories.js+++ b/src/categories.js@@ -66,24 +66,6 @@ Categories.isIgnored = function (cids, uid, callback) {db.isSortedSetMembers('uid:' + uid + ':ignored:cids', cids, callback);};-Categories.getPageCount = function (cid, uid, callback) {- async.waterfall([- function (next) {- async.parallel({- topicCount: async.apply(Categories.getCategoryField, cid, 'topic_count'),- settings: async.apply(user.getSettings, uid),- }, next);- },- function (results, next) {- if (!parseInt(results.topicCount, 10)) {- return next(null, 1);- }-- next(null, Math.ceil(parseInt(results.topicCount, 10) / results.settings.topicsPerPage));- },- ], callback);-};-Categories.getAllCategories = function (uid, callback) {async.waterfall([function (next) {diff --git a/src/socket.io/categories.js b/src/socket.io/categories.jsindex 97bdc7d44c..72a5785a55 100644--- a/src/socket.io/categories.js+++ b/src/socket.io/categories.js@@ -123,10 +123,6 @@ SocketCategories.loadMore = function (socket, data, callback) {], callback);};-SocketCategories.getPageCount = function (socket, cid, callback) {- categories.getPageCount(cid, socket.uid, callback);-};-SocketCategories.getTopicCount = function (socket, cid, callback) {categories.getCategoryField(cid, 'topic_count', callback);};diff --git a/src/topics.js b/src/topics.jsindex 7c7a902a5a..52f08c9ca7 100644--- a/src/topics.js+++ b/src/topics.js@@ -37,25 +37,6 @@ Topics.exists = function (tid, callback) {db.isSortedSetMember('topics:tid', tid, callback);};-Topics.getPageCount = function (tid, uid, callback) {- var postCount;- async.waterfall([- function (next) {- Topics.getTopicField(tid, 'postcount', next);- },- function (_postCount, next) {- if (!parseInt(_postCount, 10)) {- return callback(null, 1);- }- postCount = _postCount;- user.getSettings(uid, next);- },- function (settings, next) {- next(null, Math.ceil(parseInt(postCount, 10) / settings.postsPerPage));- },- ], callback);-};-Topics.getTopicsFromSet = function (set, uid, start, stop, callback) {async.waterfall([function (next) {diff --git a/test/categories.js b/test/categories.jsindex 04723eb28f..3f7468d24d 100644--- a/test/categories.js+++ b/test/categories.js@@ -238,14 +238,6 @@ describe('Categories', function () {});});- it('should load page count', function (done) {- socketCategories.getPageCount({ uid: posterUid }, categoryObj.cid, function (err, pageCount) {- assert.ifError(err);- assert.equal(pageCount, 1);- done();- });- });-it('should load topic count', function (done) {socketCategories.getTopicCount({ uid: posterUid }, categoryObj.cid, function (err, topicCount) {assert.ifError(err);