From 575350bad6ed5f90a9bcd76b899b2134c38129f7 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 2 Apr 2013 12:12:43 +0200 Subject: [PATCH] Makes it possible to easily update counters via AbstractDBOAction::update() --- .../files/lib/data/AbstractDatabaseObjectAction.class.php | 6 ++++++ 1 file changed, 6 insertions(+) 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']); + } + } } /** -- 2.20.1