From: Matthias Schmidt Date: Tue, 2 Apr 2013 10:12:43 +0000 (+0200) Subject: Makes it possible to easily update counters via AbstractDBOAction::update() X-Git-Tag: 2.0.0_Beta_1~381^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=575350bad6ed5f90a9bcd76b899b2134c38129f7;p=GitHub%2FWoltLab%2FWCF.git Makes it possible to easily update counters via AbstractDBOAction::update() --- diff --git a/wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php b/wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php index 2a10f27f36..3e28be5ceb 100644 --- a/wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php +++ b/wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php @@ -328,6 +328,12 @@ abstract class AbstractDatabaseObjectAction implements IDatabaseObjectAction, ID $object->update($this->parameters['data']); } } + + if (isset($this->parameters['counters'])) { + foreach ($this->objects as $object) { + $object->updateCounters($this->parameters['counters']); + } + } } /**