Empty object id is now properly handled
authorAlexander Ebert <ebert@woltlab.com>
Mon, 18 Feb 2013 14:28:26 +0000 (15:28 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 18 Feb 2013 14:28:26 +0000 (15:28 +0100)
wcfsetup/install/files/lib/data/acl/option/ACLOptionAction.class.php

index 690b737208d974eb894b88eec4dda55e75fe0883..7ce37fa186871a5b2eb7c051a41e6ff35f0f84a1 100644 (file)
@@ -23,7 +23,7 @@ class ACLOptionAction extends AbstractDatabaseObjectAction {
         * Validates parameters for ACL options.
         */
        public function validateLoadAll() {
-               $this->readInteger('objectID', true);
+               $this->readInteger('objectID', false);
                $this->readInteger('objectTypeID');
                $this->readString('categoryName', true);
        }
@@ -34,7 +34,7 @@ class ACLOptionAction extends AbstractDatabaseObjectAction {
         * @return      array
         */
        public function loadAll() {
-               $objectIDs = (isset($this->parameters['objectID'])) ? array($this->parameters['objectID']) : array();
+               $objectIDs = ($this->parameters['objectID']) ? array($this->parameters['objectID']) : array();
                $permissions = ACLHandler::getInstance()->getPermissions($this->parameters['objectTypeID'], $objectIDs, $this->parameters['categoryName'], true);
                
                return $permissions;