Index: trunk/core/kernel/db/dbitem.php =================================================================== diff -u -N -r8065 -r8067 --- trunk/core/kernel/db/dbitem.php (.../dbitem.php) (revision 8065) +++ trunk/core/kernel/db/dbitem.php (.../dbitem.php) (revision 8067) @@ -396,6 +396,9 @@ $this->saveCustomFields(); $this->raiseEvent('OnAfterItemUpdate'); $this->Loaded = true; + if ($this->mode != 't') { + $this->Application->resetCounters($this->TableName); + } return true; } @@ -725,6 +728,9 @@ } $this->saveCustomFields(); + if ($this->mode != 't') { + $this->Application->resetCounters($this->TableName); + } $this->raiseEvent('OnAfterItemCreate'); $this->Loaded = true; return true; @@ -749,7 +755,9 @@ $this->setModifiedFlag(); $this->raiseEvent('OnAfterItemDelete'); - + if ($this->mode != 't') { + $this->Application->resetCounters($this->TableName); + } return $ret; }