From bb202324d9ca5cee2e31f0eaf7a2aeeb788d793b Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 22 Aug 2016 11:31:44 +0200 Subject: [PATCH] Fixed full quotes being recognized as partial quotes --- wcfsetup/install/files/js/WCF.Message.js | 5 +++-- .../lib/system/message/quote/MessageQuoteManager.class.php | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index 28e8955924..92a7aeffaf 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -1607,10 +1607,11 @@ WCF.Message.Quote.Manager = Class.extend({ // event forwarding WCF.System.Event.addListener('com.woltlab.wcf.message.quote', 'insert', (function(data) { + //noinspection JSUnresolvedVariable WCF.System.Event.fireEvent('com.woltlab.wcf.redactor2', 'insertQuote_' + (this._editorIdAlternative ? this._editorIdAlternative : this._editorId), { author: data.quote.username, content: data.quote.text, - isText: true, + isText: !data.quote.isFullQuote, link: data.quote.link }); }).bind(this)); @@ -1857,7 +1858,7 @@ WCF.Message.Quote.Manager = Class.extend({ var message = listItem.parents('.message:eq(0)'); var author = message.data('username'); var link = message.data('link'); - var isText = elData(listItem[0], 'is-full-quote'); + var isText = !elDataBool(listItem[0], 'is-full-quote'); WCF.System.Event.fireEvent('com.woltlab.wcf.redactor2', 'insertQuote_' + (this._editorIdAlternative ? this._editorIdAlternative : this._editorId), { author: author, diff --git a/wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php b/wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php index 57e85a2ea5..1e3137d976 100644 --- a/wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php +++ b/wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php @@ -254,6 +254,8 @@ class MessageQuoteManager extends SingletonFactory { $this->markQuotesForRemoval([$quoteID]); + $renderedQuotes[0]['isFullQuote'] = (isset($this->quoteData[$quoteID . '_fq'])); + return $renderedQuotes[0]; } } -- 2.20.1