From e9aeabca4e3ab922b93dd4648d2f9ce8bf27110b Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 2 Nov 2011 22:06:06 +0100 Subject: [PATCH] Added setObjects method to AbstractDatabaseObjectAction --- .../data/AbstractDatabaseObjectAction.class.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) 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'); -- 2.20.1