mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
always setting app.previousUrl now, and passing cid into filter:category.topics.get hook
This commit is contained in:
@@ -67,9 +67,7 @@ $(document).ready(function () {
|
||||
apiXHR.abort();
|
||||
}
|
||||
|
||||
if (!window.location.pathname.match(/\/(403|404)$/g)) {
|
||||
app.previousUrl = window.location.href;
|
||||
}
|
||||
|
||||
url = ajaxify.start(url);
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ module.exports = function (Categories) {
|
||||
topics[i].index = data.start + i;
|
||||
}
|
||||
|
||||
plugins.fireHook('filter:category.topics.get', {topics: topics, uid: data.uid}, next);
|
||||
plugins.fireHook('filter:category.topics.get', {cid: data.cid, topics: topics, uid: data.uid}, next);
|
||||
},
|
||||
function (results, next) {
|
||||
next(null, {topics: results.topics, nextStart: data.stop + 1});
|
||||
|
||||
@@ -272,7 +272,7 @@ module.exports = function (Topics) {
|
||||
db.sortedSetsRemove([
|
||||
'cid:' + topicData.cid + ':tids',
|
||||
'cid:' + topicData.cid + ':tids:pinned',
|
||||
'cid:' + topicData.cid + ':tids:posts'
|
||||
'cid:' + topicData.cid + ':tids:posts' // post count
|
||||
], tid, next);
|
||||
},
|
||||
function (next) {
|
||||
|
||||
Reference in New Issue
Block a user