From fb764472dd305850637de38fea74ac9ebccb012d Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 23 Sep 2014 13:48:15 -0400 Subject: [PATCH] closes #2125 --- public/src/forum/topic/postTools.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/public/src/forum/topic/postTools.js b/public/src/forum/topic/postTools.js index 2bc22cb06a..a4b7708e2a 100644 --- a/public/src/forum/topic/postTools.js +++ b/public/src/forum/topic/postTools.js @@ -131,7 +131,9 @@ define('forum/topic/postTools', ['composer', 'share', 'navigator'], function(com } var username = getUserName(selectionText ? $(selection.baseNode) : button); - + if (getData(button, 'data-uid') === '0') { + username = ''; + } if (selectionText.length) { composer.addQuote(tid, ajaxify.variables.get('topic_slug'), getData(button, 'data-index'), getData(button, 'data-pid'), topicName, username, selectionText); } else { @@ -201,8 +203,12 @@ define('forum/topic/postTools', ['composer', 'share', 'navigator'], function(com post = button.parents('li[data-pid]'); if (post.length) { - username = '@' + post.attr('data-username').replace(/\s/g, '-'); + username = post.attr('data-username').replace(/\s/g, '-'); } + if (post.attr('data-uid') !== '0') { + username = '@' + username; + } + return username; }