Makes it possible to easily update counters via AbstractDBOAction::update()
authorMatthias Schmidt <gravatronics@live.com>
Tue, 2 Apr 2013 10:12:43 +0000 (12:12 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Tue, 2 Apr 2013 10:12:43 +0000 (12:12 +0200)
wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php

index 2a10f27f364c724693bed59669b5e51e0d0ea780..3e28be5cebd907ec79f8508440e8e8667cb5c4f6 100644 (file)
@@ -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']);
+                       }
+               }
        }
        
        /**