Merge branch '2.0'
authorMarcel Werk <burntime@woltlab.com>
Sat, 27 Sep 2014 20:16:59 +0000 (22:16 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sat, 27 Sep 2014 20:16:59 +0000 (22:16 +0200)
Conflicts:
wcfsetup/install/files/lib/system/message/QuickReplyManager.class.php

1  2 
wcfsetup/install/files/lib/form/MessageForm.class.php
wcfsetup/install/files/lib/system/message/QuickReplyManager.class.php

index 5b699ee67df85dec03954ad3ec6ca2c3db3ee8d8,e71c12d5cb4cb3a0b81fd3fd02d650f96a8b0bc7..c16870c2bee697408299d969577b4b59df7bc271
@@@ -180,23 -171,9 +186,22 @@@ class QuickReplyManager extends Singlet
                $parameters['data']['username'] = WCF::getUser()->username;
                
                // pre-parse message text
-               $parameters['data']['message'] = MessageUtil::stripCrap($parameters['data']['message']);
 -              $parameters['data']['message'] = PreParser::getInstance()->parse($parameters['data']['message'], $this->allowedBBodes);
 +              if ($parameters['data']['preParse']) {
 +                      $parameters['data']['message'] = PreParser::getInstance()->parse($parameters['data']['message'], $this->allowedBBodes);
 +              }
 +              unset($parameters['data']['preParse']);
 +              
 +              $parameters['data'] = array_merge($additionalFields, $parameters['data']);
 +              
 +              // attachment support
 +              if (MODULE_ATTACHMENT && $object instanceof IAttachmentMessageQuickReplyAction) {
 +                      $parameters['attachmentHandler'] = $object->getAttachmentHandler($this->container);
 +              }
                
                $message = $object->create();
 +              $eventParameters = array('message' => $message);
 +              EventHandler::getInstance()->fireAction($this, 'createdMessage', $eventParameters);
 +              
                if ($message instanceof IMessage && !$message->isVisible()) {
                        return array(
                                'isVisible' => false