Skip to content

Commit 2bde0fc

Browse files
committed
fix: Ensure updateMany respects bSkipUpdateUsers
Currently it only restores the `bSkipUpdateTimestamp` behaviour, this commit ensures both are properly managed.
1 parent 3df925f commit 2bde0fc

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/Common/Model/Base.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,11 +541,12 @@ public function updateMany(array $aIds, array $aData = []): bool
541541
$oDb = Factory::service('Database');
542542

543543
/**
544-
* Note the current timestamp behaiour, if we want to skip it then we'll
545-
* need to re-set it on each iteration of the loop as `update()` will
546-
* reset it.
544+
* Note the current timestamp and user behaviours, if we want to skip either
545+
* then we'll need to re-set it on each iteration of the loop as `update()`
546+
* will reset it.
547547
*/
548548
$bSkipUpdateTimestamps = $this->bSkipUpdateTimestamp;
549+
$bSkipUpdateUsers = $this->bSkipUpdateUsers;
549550

550551
try {
551552
$oDb->transaction()->start();
@@ -555,6 +556,10 @@ public function updateMany(array $aIds, array $aData = []): bool
555556
$this->skipUpdateTimestamp();
556557
}
557558

559+
if ($bSkipUpdateUsers) {
560+
$this->skipUpdateUsers();
561+
}
562+
558563
if (!$this->update($iId, $aData)) {
559564
throw new ModelException('Failed to update item with ID ' . $iId);
560565
}

0 commit comments

Comments
 (0)