From: Marcel Werk Date: Wed, 2 Nov 2011 21:06:06 +0000 (+0100) Subject: Added setObjects method to AbstractDatabaseObjectAction X-Git-Tag: 2.0.0_Beta_1~1632 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e9aeabca4e3ab922b93dd4648d2f9ce8bf27110b;p=GitHub%2FWoltLab%2FWCF.git Added setObjects method to AbstractDatabaseObjectAction --- diff --git a/wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php b/wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php index f5672f2d35..5f66ed8412 100644 --- a/wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php +++ b/wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php @@ -152,6 +152,15 @@ abstract class AbstractDatabaseObjectAction implements IDatabaseObjectAction { return $this->objectIDs; } + /** + * Sets the database objects. + * + * @param array $objects + */ + public function setObjects(array $objects) { + $this->objects = $objects; + } + /** * @see wcf\data\IDatabaseObjectAction::getParameters() */ @@ -205,7 +214,9 @@ abstract class AbstractDatabaseObjectAction implements IDatabaseObjectAction { } // read data - $this->readObjects(); + if (!count($this->objects)) { + $this->readObjects(); + } if (!count($this->objects)) { throw new ValidateActionException('Invalid object id'); @@ -230,7 +241,9 @@ abstract class AbstractDatabaseObjectAction implements IDatabaseObjectAction { } // read data - $this->readObjects(); + if (!count($this->objects)) { + $this->readObjects(); + } if (!count($this->objects)) { throw new ValidateActionException('Invalid object id');