always setting app.previousUrl now, and passing cid into filter:category.topics.get hook

v1.18.x
Julian Lam 8 years ago
parent 2a9088d571
commit c99321a518

@ -67,9 +67,7 @@ $(document).ready(function () {
apiXHR.abort(); apiXHR.abort();
} }
if (!window.location.pathname.match(/\/(403|404)$/g)) { app.previousUrl = window.location.href;
app.previousUrl = window.location.href;
}
url = ajaxify.start(url); url = ajaxify.start(url);

@ -28,7 +28,7 @@ module.exports = function (Categories) {
topics[i].index = data.start + i; 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) { function (results, next) {
next(null, {topics: results.topics, nextStart: data.stop + 1}); next(null, {topics: results.topics, nextStart: data.stop + 1});

@ -272,7 +272,7 @@ module.exports = function (Topics) {
db.sortedSetsRemove([ db.sortedSetsRemove([
'cid:' + topicData.cid + ':tids', 'cid:' + topicData.cid + ':tids',
'cid:' + topicData.cid + ':tids:pinned', 'cid:' + topicData.cid + ':tids:pinned',
'cid:' + topicData.cid + ':tids:posts' 'cid:' + topicData.cid + ':tids:posts' // post count
], tid, next); ], tid, next);
}, },
function (next) { function (next) {

Loading…
Cancel
Save