Index: trunk/core/units/general/cat_dbitem.php =================================================================== diff -u -r4314 -r4758 --- trunk/core/units/general/cat_dbitem.php (.../cat_dbitem.php) (revision 4314) +++ trunk/core/units/general/cat_dbitem.php (.../cat_dbitem.php) (revision 4758) @@ -32,8 +32,8 @@ $ret = parent::Create(); if($ret) { - if ( kTempTablesHandler::IsTempTable($this->TableName) ) { - $table = kTempTablesHandler::GetTempName(TABLE_PREFIX.'CategoryItems'); + if ( $this->Application->IsTempTable($this->TableName) ) { + $table = $this->Application->GetTempName(TABLE_PREFIX.'CategoryItems'); } else { $table = TABLE_PREFIX.'CategoryItems'; @@ -218,7 +218,7 @@ $found_temp_ids = $this->Conn->GetCol($sql_temp); // check live table - $sql_live = 'SELECT '.$this->IDField.' FROM '.kTempTablesHandler::GetLiveName($this->TableName).' WHERE Filename = '.$this->Conn->qstr($filename); + $sql_live = 'SELECT '.$this->IDField.' FROM '.$this->Application->GetLiveName($this->TableName).' WHERE Filename = '.$this->Conn->qstr($filename); $found_live_ids = $this->Conn->GetCol($sql_live); $found_item_ids = array_unique( array_merge($found_temp_ids, $found_live_ids) ); @@ -237,7 +237,7 @@ // check live & temp table $sql_temp = 'SELECT '.$this->IDField.' FROM '.$this->TableName.' WHERE (Filename = %s) AND ('.$this->IDField.' != '.$item_id.')'; - $sql_live = 'SELECT '.$this->IDField.' FROM '.kTempTablesHandler::GetLiveName($this->TableName).' WHERE (Filename = %s) AND ('.$this->IDField.' != '.$item_id.')'; + $sql_live = 'SELECT '.$this->IDField.' FROM '.$this->Application->GetLiveName($this->TableName).' WHERE (Filename = %s) AND ('.$this->IDField.' != '.$item_id.')'; while ( $this->Conn->GetOne( sprintf($sql_temp, $this->Conn->qstr($filename.$append)) ) > 0 || $this->Conn->GetOne( sprintf($sql_live, $this->Conn->qstr($filename.$append)) ) > 0 ) {