1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 07:47:00 +02:00

Minor optimization to Page::setAndSave

This commit is contained in:
Ryan Cramer
2024-07-11 12:15:58 -04:00
parent 4ee947d237
commit e508cfa2a7

View File

@@ -2427,6 +2427,7 @@ class Page extends WireData implements \Countable, WireMatchable {
if($of) $this->of(false);
foreach($values as $k => $v) {
$this->set($k, $v);
if(!$property) $this->trackChange($k);
}
if($property) {
$result = $this->save($property, $options);