Index: branches/5.1.x/core/units/categories/cache_updater.php =================================================================== diff -u -r13086 -r13168 --- branches/5.1.x/core/units/categories/cache_updater.php (.../cache_updater.php) (revision 13086) +++ branches/5.1.x/core/units/categories/cache_updater.php (.../cache_updater.php) (revision 13168) @@ -1,6 +1,6 @@ Conn->Query('UPDATE '.TABLE_PREFIX.'ConfigurationValues SET VariableValue = VariableValue+1 WHERE VariableName = \'CategoriesRebuildSerial\''); + + // always drop temporary tables $this->Conn->Query('DROP TABLE IF EXISTS '.$this->progressTable); $this->Conn->Query('DROP TABLE IF EXISTS '.$this->permCacheTable); - $this->Conn->Query('DELETE FROM '.TABLE_PREFIX.'Cache WHERE VarName = \'ForcePermCacheUpdate\''); - $this->Conn->Query('UPDATE '.TABLE_PREFIX.'ConfigurationValues SET VariableValue = VariableValue+1 WHERE VariableName = \'CategoriesRebuildSerial\''); + $this->Application->deleteDBCache('ForcePermCacheUpdate'); } function SaveData() @@ -338,6 +341,8 @@ FROM '.$this->permCacheTable; $this->Conn->Query($sql); $this->clearData(); + + $this->Application->incrementCacheSerial('c'); } function DoTheJob() @@ -449,6 +454,10 @@ } $this->Conn->doUpdate($fields_hash, TABLE_PREFIX.'Category', 'CategoryId = '.$data['current_id']); + + if ($this->Conn->getAffectedRows() > 0) { + $this->Application->incrementCacheSerial('c', $data['current_id']); + } } function QueryTitle(&$data)