mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 00:15: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.each(function() {
|
||||
var href = $(this).attr('href');
|
||||
if (href && app.userslug) {
|
||||
$(this).attr('href', href.replace(/\[self\]/g, app.userslug));
|
||||
if (href && app.userslug && href.indexOf('_') !== -1) {
|
||||
$(this).attr('href', href.replace(/_/g, app.userslug));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -17,9 +17,17 @@ module.exports = function(Categories) {
|
||||
return callback(null, []);
|
||||
}
|
||||
|
||||
posts.getPostsFromSet('cid:' + cid + ':pids', uid, 0, count - 1, function(err, data) {
|
||||
callback(err, data ? data.posts : []);
|
||||
});
|
||||
async.waterfall([
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user