Index: trunk/kernel/include/category.php =================================================================== diff -u -r1009 -r1022 --- trunk/kernel/include/category.php (.../category.php) (revision 1009) +++ trunk/kernel/include/category.php (.../category.php) (revision 1022) @@ -71,8 +71,11 @@ if($this->UsingTempTable()==FALSE) { $this->Permissions->Delete_CatPerms($this->Get("CategoryId")); - $sql = "DELETE FROM ".GetTablePrefix()."CountCache WHERE CategoryId=".$this->Get("CategoryId"); - $this->adodbConnection->Execute($sql); + + // TODO: find way to delete specific category cache only + /*$sql = "DELETE FROM ".GetTablePrefix()."CountCache WHERE CategoryId=".$this->Get("CategoryId"); + $this->adodbConnection->Execute($sql);*/ + $CatDeleteList[] = $this->Get("CategoryId"); if($this->Get("CreatedById")>0) $this->SendUserEventMail("CATEGORY.DELETE",$this->Get("CreatedById")); Index: trunk/kernel/include/itemdb.php =================================================================== diff -u -r1004 -r1022 --- trunk/kernel/include/itemdb.php (.../itemdb.php) (revision 1004) +++ trunk/kernel/include/itemdb.php (.../itemdb.php) (revision 1022) @@ -496,7 +496,7 @@ { global $Errors; - $sql = "Update ".$this->tablename." set $field=$field-1 where ".$this->IdField()."=" . $this->UniqueId(); + $sql = "Update ".$this->tablename." set $field=$field-1 where ".$this->IdField()."=" .(int)$this->UniqueId(); if($this->debuglevel>0) echo $sql; $result = $this->adodbConnection->Execute($sql);