From 8d2c4fd6251827dbe5d806d078f0a732002bc22d Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Sat, 13 Jul 2013 12:27:37 -0400 Subject: [PATCH] closes #76 --- public/templates/topic.tpl | 8 ++++---- src/posts.js | 10 +++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) 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(); + } }); }