Index: branches/5.2.x/core/kernel/db/cat_dbitem.php =================================================================== diff -u -N -r14699 -r14719 --- branches/5.2.x/core/kernel/db/cat_dbitem.php (.../cat_dbitem.php) (revision 14699) +++ branches/5.2.x/core/kernel/db/cat_dbitem.php (.../cat_dbitem.php) (revision 14719) @@ -1,6 +1,6 @@ CategoryPath = Array(); @@ -58,31 +65,11 @@ } /** - * Creates a record in the database table with current item' values - * - * @param mixed $force_id Set to TRUE to force creating of item's own ID or to value to force creating of passed id. Do not pass 1 for true, pass exactly TRUE! - * @param bool $system_create - * @return bool - * @access public - */ - public function Create($force_id = false, $system_create = false) - { - $ret = parent::Create($force_id, $system_create); - - if ($ret) { - // TODO: move to OnAfterItemCreate method - $this->assignPrimaryCategory(); - } - - return $ret; - } - - /** * Assigns primary category for the item * * @access public */ - function assignPrimaryCategory() + public function assignPrimaryCategory() { if ( $this->GetDBField('CategoryId') <= 0 ) { // set primary category in item object @@ -103,15 +90,6 @@ */ public function Update($id = null, $system_update = false) { - $this->VirtualFields['ResourceId'] = Array (); - - if ( $this->GetChangedFields() ) { - $now = adodb_mktime(); - $this->SetDBField('Modified_date', $now); - $this->SetDBField('Modified_time', $now); - $this->SetDBField('ModifiedById', $this->Application->RecallVar('user_id')); - } - if ( $this->useFilenames ) { $this->checkFilename(); $this->generateFilename(); @@ -127,8 +105,6 @@ $this->Conn->Query($sql); } - unset($this->VirtualFields['ResourceId']); - return $ret; }