Fixed mail worker
authorMarcel Werk <burntime@woltlab.com>
Mon, 20 May 2013 17:25:35 +0000 (19:25 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 20 May 2013 17:25:35 +0000 (19:25 +0200)
wcfsetup/install/files/acp/templates/userMail.tpl
wcfsetup/install/files/lib/system/worker/MailWorker.class.php

index 35585de7090b323959f7455f248ab1901b989296..90178539555fb1ebbdf3744a26941f391ca483a5 100644 (file)
@@ -12,7 +12,7 @@
        <script type="text/javascript">
                //<![CDATA[
                $(function() {
-                       new WCF.ACP.Worker('mail', 'wcf\\system\\worker\\MailWorker', {
+                       new WCF.ACP.Worker('mail', 'wcf\\system\\worker\\MailWorker', '', {
                                mailID: {@$mailID}
                        });
                });
index 08161d8013c39ce64b7f76a8717282d13bc48496..4852bde7bf8d8d6f2221221a04955dc396d31641 100644 (file)
@@ -5,6 +5,7 @@ use wcf\system\clipboard\ClipboardHandler;
 use wcf\system\database\util\PreparedStatementConditionBuilder;
 use wcf\system\exception\SystemException;
 use wcf\system\mail\Mail;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\StringUtil;
 
@@ -125,7 +126,7 @@ class MailWorker extends AbstractWorker {
         */
        protected function sendMail(User $user) {
                try {
-                       $mail = new Mail(array($user->username => $user->email), $this->userMailData['subject'], StringUtil::replace('{$username}', $user->username, $this->mailData['text']), $this->mailData['from']);
+                       $mail = new Mail(array($user->username => $user->email), $this->mailData['subject'], StringUtil::replace('{$username}', $user->username, $this->mailData['text']), $this->mailData['from']);
                        if ($this->mailData['enableHTML']) $mail->setContentType('text/html');
                        $mail->setLanguage($user->getLanguage());
                        $mail->send();
@@ -139,7 +140,6 @@ class MailWorker extends AbstractWorker {
         * @see wcf\system\worker\IWorker::getProceedURL()
         */
        public function getProceedURL() {
-               // todo: use LinkHander?
-               return 'index.php?page=UserList' . SID_ARG_2ND_NOT_ENCODED;
+               return LinkHandler::getInstance()->getLink('UserList');
        }
 }