mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +01:00
Remove calls to feed.js
This commit is contained in:
@@ -11,8 +11,7 @@ var winston = require('winston'),
|
|||||||
utils = require('../public/src/utils'),
|
utils = require('../public/src/utils'),
|
||||||
plugins = require('./plugins'),
|
plugins = require('./plugins'),
|
||||||
events = require('./events'),
|
events = require('./events'),
|
||||||
meta = require('./meta'),
|
meta = require('./meta');
|
||||||
Feed = require('./feed');
|
|
||||||
|
|
||||||
(function(PostTools) {
|
(function(PostTools) {
|
||||||
PostTools.isMain = function(pid, tid, callback) {
|
PostTools.isMain = function(pid, tid, callback) {
|
||||||
@@ -162,8 +161,6 @@ var winston = require('winston'),
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Feed.updateTopic(postData.tid);
|
|
||||||
Feed.updateRecent();
|
|
||||||
|
|
||||||
callback(null);
|
callback(null);
|
||||||
});
|
});
|
||||||
@@ -207,8 +204,6 @@ var winston = require('winston'),
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
Feed.updateTopic(postData.tid);
|
|
||||||
Feed.updateRecent();
|
|
||||||
|
|
||||||
db.searchIndex('post', postData.content, pid);
|
db.searchIndex('post', postData.content, pid);
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ var db = require('./database'),
|
|||||||
threadTools = require('./threadTools'),
|
threadTools = require('./threadTools'),
|
||||||
postTools = require('./postTools'),
|
postTools = require('./postTools'),
|
||||||
categories = require('./categories'),
|
categories = require('./categories'),
|
||||||
feed = require('./feed'),
|
|
||||||
plugins = require('./plugins'),
|
plugins = require('./plugins'),
|
||||||
meta = require('./meta'),
|
meta = require('./meta'),
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ var async = require('async'),
|
|||||||
threadTools = require('./threadTools'),
|
threadTools = require('./threadTools'),
|
||||||
postTools = require('./postTools'),
|
postTools = require('./postTools'),
|
||||||
notifications = require('./notifications'),
|
notifications = require('./notifications'),
|
||||||
feed = require('./feed'),
|
|
||||||
favourites = require('./favourites'),
|
favourites = require('./favourites'),
|
||||||
meta = require('./meta');
|
meta = require('./meta');
|
||||||
|
|
||||||
@@ -57,8 +56,6 @@ var async = require('async'),
|
|||||||
db.incrObjectField('category:' + cid, 'topic_count');
|
db.incrObjectField('category:' + cid, 'topic_count');
|
||||||
db.incrObjectField('global', 'topicCount');
|
db.incrObjectField('global', 'topicCount');
|
||||||
|
|
||||||
feed.updateCategory(cid);
|
|
||||||
|
|
||||||
callback(null, tid);
|
callback(null, tid);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -158,12 +155,10 @@ var async = require('async'),
|
|||||||
db.getObjectField('tid:lastFeedUpdate', tid, function(err, lastFeedUpdate) {
|
db.getObjectField('tid:lastFeedUpdate', tid, function(err, lastFeedUpdate) {
|
||||||
var now = Date.now();
|
var now = Date.now();
|
||||||
if(!lastFeedUpdate || parseInt(lastFeedUpdate, 10) < now - 3600000) {
|
if(!lastFeedUpdate || parseInt(lastFeedUpdate, 10) < now - 3600000) {
|
||||||
feed.updateTopic(tid);
|
|
||||||
db.setObjectField('tid:lastFeedUpdate', tid, now);
|
db.setObjectField('tid:lastFeedUpdate', tid, now);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
feed.updateRecent();
|
|
||||||
threadTools.notifyFollowers(tid, postData.pid, uid);
|
threadTools.notifyFollowers(tid, postData.pid, uid);
|
||||||
user.sendPostNotificationToFollowers(uid, tid, postData.pid);
|
user.sendPostNotificationToFollowers(uid, tid, postData.pid);
|
||||||
|
|
||||||
@@ -1185,7 +1180,6 @@ var async = require('async'),
|
|||||||
db.sortedSetRemove('topics:views', tid);
|
db.sortedSetRemove('topics:views', tid);
|
||||||
|
|
||||||
Topics.getTopicField(tid, 'cid', function(err, cid) {
|
Topics.getTopicField(tid, 'cid', function(err, cid) {
|
||||||
feed.updateCategory(cid);
|
|
||||||
db.incrObjectFieldBy('category:' + cid, 'topic_count', -1);
|
db.incrObjectFieldBy('category:' + cid, 'topic_count', -1);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1199,7 +1193,6 @@ var async = require('async'),
|
|||||||
});
|
});
|
||||||
|
|
||||||
Topics.getTopicField(tid, 'cid', function(err, cid) {
|
Topics.getTopicField(tid, 'cid', function(err, cid) {
|
||||||
feed.updateCategory(cid);
|
|
||||||
db.incrObjectFieldBy('category:' + cid, 'topic_count', 1);
|
db.incrObjectFieldBy('category:' + cid, 'topic_count', 1);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1224,4 +1217,4 @@ var async = require('async'),
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}(exports));
|
}(exports));
|
||||||
|
|||||||
Reference in New Issue
Block a user