diff --git a/public/src/forum/category.js b/public/src/forum/category.js
index 0db384a34e..6eca6018e4 100644
--- a/public/src/forum/category.js
+++ b/public/src/forum/category.js
@@ -61,27 +61,25 @@
});
-
socket.emit('api:categories.getRecentReplies', cid);
- socket.on('api:categories.getRecentReplies', function(replies) {
- if (replies === false) {
+ socket.on('api:categories.getRecentReplies', function(posts) {
+ if (!posts || posts.length === 0) {
return;
}
- var users = replies.users,
- posts = replies.posts,
- recent_replies = document.getElementById('category_recent_replies');
+ var recent_replies = document.getElementById('category_recent_replies');
recent_replies.innerHTML = '';
- for (var i=0, ii=posts.pids.length; i
' + username + ': ' + posts.content[i] + '
posted ' + utils.relativeTime(posts.timestamp[i]) + ' ago'; + + '' + username + ': ' + posts[i].content + '
posted ' + utils.relativeTime(posts[i].timestamp) + ' ago'; a.appendChild(ul); recent_replies.appendChild(a); diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl index 280a9b4ddf..76f3c91537 100644 --- a/public/templates/topic.tpl +++ b/public/templates/topic.tpl @@ -17,7 +17,7 @@