Fixed full quotes being recognized as partial quotes
authorAlexander Ebert <ebert@woltlab.com>
Mon, 22 Aug 2016 09:31:44 +0000 (11:31 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 22 Aug 2016 09:31:44 +0000 (11:31 +0200)
wcfsetup/install/files/js/WCF.Message.js
wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php

index 28e89559245f9beb5d45e5305b751c3f1532ca58..92a7aeffafc4a1f22d2bcb82a9351dcef4515a22 100644 (file)
@@ -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,
index 57e85a2ea5a2e33c2966c59b38ab6c27c761c4ab..1e3137d9763076e47dbc479dc5644e0a0bdd9ad7 100644 (file)
@@ -254,6 +254,8 @@ class MessageQuoteManager extends SingletonFactory {
                                        
                                        $this->markQuotesForRemoval([$quoteID]);
                                        
+                                       $renderedQuotes[0]['isFullQuote'] = (isset($this->quoteData[$quoteID . '_fq']));
+                                       
                                        return $renderedQuotes[0];
                                }
                        }