diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl index 576afb828f..7ef124deca 100644 --- a/public/templates/topic.tpl +++ b/public/templates/topic.tpl @@ -56,8 +56,8 @@
{main_posts.signature}
posted by {main_posts.username} {main_posts.relativeTime} ago - | last edited by {main_posts.editor} {main_posts.relativeEditTime} ago - + | last edited by {main_posts.editorname} {main_posts.relativeEditTime} ago +
@@ -91,8 +91,8 @@
posted by {posts.username} {posts.relativeTime} ago - | last edited by {posts.editor} {posts.relativeEditTime} ago - + | last edited by {posts.editorname} {posts.relativeEditTime} ago +
diff --git a/src/posts.js b/src/posts.js index 1e0ed0c820..b5901cd4f9 100644 --- a/src/posts.js +++ b/src/posts.js @@ -41,7 +41,15 @@ marked.setOptions({ post.picture = userData.picture || require('gravatar').url('', {}, https=global.config.https); post.signature = marked(userData.signature || ''); - callback(); + if(post.editor !== '') { + user.getUserFields(post.editor, ['username', 'userslug'], function(editorData) { + post.editorname = editorData.username; + post.editorslug = editorData.userslug; + callback(); + }); + } else { + callback(); + } }); }