/**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     // save message in database
     $update = $this->pm && !$this->forwarding && !$this->reply;
     // search for double posts
     if (!$update && PMEditor::test($this->recipientArray, $this->blindCopyArray, $this->subject, $this->text, WCF::getUser()->userID, WCF::getUser()->username)) {
         HeaderUtil::redirect('index.php?page=PMList' . SID_ARG_2ND_NOT_ENCODED);
         exit;
     }
     if ($update) {
         $this->pm->update($this->draft, $this->recipientArray, $this->blindCopyArray, $this->subject, $this->text, $this->getOptions(), $this->attachmentListEditor);
         $this->newPm = new PMEditor($this->pm->pmID);
     } else {
         $this->newPm = PMEditor::create($this->draft, $this->recipientArray, $this->blindCopyArray, $this->subject, $this->text, WCF::getUser()->userID, WCF::getUser()->username, $this->getOptions(), $this->attachmentListEditor, $this->pm && $this->reply ? $this->pm->parentPmID : 0);
     }
     // reply & forwarding
     if ($this->pmID) {
         if ($this->reply) {
             $this->pm->markAsReplied();
         }
         if ($this->forwarding) {
             $this->pm->markAsForwarded();
         }
     }
     // send e-mail notification
     if (!$this->draft) {
         $this->sendNotification();
     }
     // apply rules
     if (!$this->draft) {
         $this->newPm->applyRules();
     }
     $this->saved();
     // forward to pm index
     if ($this->draft) {
         HeaderUtil::redirect('index.php?page=PMList&folderID=-2' . SID_ARG_2ND_NOT_ENCODED);
     } else {
         HeaderUtil::redirect('index.php?page=PMList' . SID_ARG_2ND_NOT_ENCODED);
     }
     exit;
 }