From 0d422aabc5f56afb4a88f3d4dea0b4092866bf52 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Mon, 7 Jan 2013 21:22:45 +0100 Subject: [PATCH] Fixes UserMailForm --- .../files/lib/acp/form/UserMailForm.class.php | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/lib/acp/form/UserMailForm.class.php b/wcfsetup/install/files/lib/acp/form/UserMailForm.class.php index cfe5c8658a..f7c44c5f7c 100755 --- a/wcfsetup/install/files/lib/acp/form/UserMailForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserMailForm.class.php @@ -15,7 +15,7 @@ use wcf\util\StringUtil; * Shows the user mail form. * * @author Marcel Werk - * @copyright 2001-2012 WoltLab GmbH + * @copyright 2001-2013 WoltLab GmbH * @license GNU Lesser General Public License * @package com.woltlab.wcf * @subpackage acp.form @@ -159,21 +159,27 @@ class UserMailForm extends AbstractForm { // get marked user ids if (empty($this->action)) { // get type id - $typeID = ClipboardHandler::getInstance()->getObjectTypeID('com.woltlab.wcf.user'); - if ($typeID === null) { - throw new SystemException("clipboard item type 'com.woltlab.wcf.user' is unknown."); + $objectTypeID = ClipboardHandler::getInstance()->getObjectTypeID('com.woltlab.wcf.user'); + if ($objectTypeID === null) { + throw new SystemException("Unknown clipboard item type 'com.woltlab.wcf.user'"); } // get user ids - $users = ClipboardHandler::getInstance()->getMarkedItems($typeID); - if (!isset($users['com.woltlab.wcf.user']) || empty($users['com.woltlab.wcf.user'])) throw new IllegalLinkException(); + $users = ClipboardHandler::getInstance()->getMarkedItems($objectTypeID); + if (empty($users)) { + throw new IllegalLinkException(); + } // load users - $this->userIDs = array_keys($users['com.woltlab.wcf.user']); + $this->userIDs = array_keys($users); } - if (MAIL_USE_FORMATTED_ADDRESS) $this->from = MAIL_FROM_NAME . ' <' . MAIL_FROM_ADDRESS . '>'; - else $this->from = MAIL_FROM_ADDRESS; + if (MAIL_USE_FORMATTED_ADDRESS) { + $this->from = MAIL_FROM_NAME.' <'.MAIL_FROM_ADDRESS.'>'; + } + else { + $this->from = MAIL_FROM_ADDRESS; + } } if (!empty($this->userIDs)) { -- 2.20.1