From: Matthias Schmidt Date: Wed, 9 Jan 2013 10:26:34 +0000 (+0100) Subject: Fixes UserAssignToGroupForm X-Git-Tag: 2.0.0_Beta_1~569^2~10 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=29bd5dcaf037e8ef31b309f63b1843bbc2fcdd0c;p=GitHub%2FWoltLab%2FWCF.git Fixes UserAssignToGroupForm --- diff --git a/wcfsetup/install/files/lib/acp/form/UserAssignToGroupForm.class.php b/wcfsetup/install/files/lib/acp/form/UserAssignToGroupForm.class.php index 3038522386..ec3c10b2e6 100755 --- a/wcfsetup/install/files/lib/acp/form/UserAssignToGroupForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserAssignToGroupForm.class.php @@ -59,10 +59,10 @@ class UserAssignToGroupForm extends AbstractForm { public $groups = array(); /** - * clipboard item type id + * id of the user clipboard item object type * @var integer */ - protected $typeID = null; + protected $objectTypeID = null; /** * @see wcf\page\IPage::readParameters() @@ -70,19 +70,19 @@ class UserAssignToGroupForm extends AbstractForm { public function readParameters() { parent::readParameters(); - // get type id - $this->typeID = ClipboardHandler::getInstance()->getObjectTypeID('com.woltlab.wcf.user'); - if ($this->typeID === null) { + // get object type id + $this->objectTypeID = ClipboardHandler::getInstance()->getObjectTypeID('com.woltlab.wcf.user'); + if ($this->objectTypeID === null) { throw new SystemException("clipboard item type 'com.woltlab.wcf.user' is unknown."); } - // get user ids - $users = ClipboardHandler::getInstance()->getMarkedItems($this->typeID); - if (!isset($users['com.woltlab.wcf.user']) || empty($users['com.woltlab.wcf.user'])) throw new IllegalLinkException(); + // get user + $this->users = ClipboardHandler::getInstance()->getMarkedItems($this->objectTypeID); + if (empty($this->users)) { + throw new IllegalLinkException(); + } - // load users - $this->userIDs = array_keys($users['com.woltlab.wcf.user']); - $this->users = $users['com.woltlab.wcf.user']; + $this->userIDs = array_keys($this->users); } /** @@ -144,7 +144,7 @@ class UserAssignToGroupForm extends AbstractForm { $userEditor->addToGroups($groupsIDs, true, false); } - ClipboardHandler::getInstance()->removeItems($this->typeID); + ClipboardHandler::getInstance()->removeItems($this->objectTypeID); SessionHandler::resetSessions($this->userIDs); $this->saved();