mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 08:25:46 +01:00
recent replies needs stripTags true
changed [self] to _
This commit is contained in:
@@ -269,8 +269,8 @@ var socket,
|
|||||||
selector = selector || $('a');
|
selector = selector || $('a');
|
||||||
selector.each(function() {
|
selector.each(function() {
|
||||||
var href = $(this).attr('href');
|
var href = $(this).attr('href');
|
||||||
if (href && app.userslug) {
|
if (href && app.userslug && href.indexOf('_') !== -1) {
|
||||||
$(this).attr('href', href.replace(/\[self\]/g, app.userslug));
|
$(this).attr('href', href.replace(/_/g, app.userslug));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,9 +17,17 @@ module.exports = function(Categories) {
|
|||||||
return callback(null, []);
|
return callback(null, []);
|
||||||
}
|
}
|
||||||
|
|
||||||
posts.getPostsFromSet('cid:' + cid + ':pids', uid, 0, count - 1, function(err, data) {
|
async.waterfall([
|
||||||
callback(err, data ? data.posts : []);
|
function(next) {
|
||||||
});
|
db.getSortedSetRevRange('cid:' + cid + ':pids', 0, count - 1, next);
|
||||||
|
},
|
||||||
|
function(pids, next) {
|
||||||
|
privileges.posts.filter('read', pids, uid, next);
|
||||||
|
},
|
||||||
|
function(pids, next) {
|
||||||
|
posts.getPostSummaryByPids(pids, uid, {stripTags: true}, next);
|
||||||
|
}
|
||||||
|
], callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
Categories.getRecentTopicReplies = function(categoryData, uid, callback) {
|
Categories.getRecentTopicReplies = function(categoryData, uid, callback) {
|
||||||
|
|||||||
Reference in New Issue
Block a user