Index: trunk/core/kernel/utility/temp_handler.php =================================================================== diff -u -r6093 -r7391 --- trunk/core/kernel/utility/temp_handler.php (.../temp_handler.php) (revision 6093) +++ trunk/core/kernel/utility/temp_handler.php (.../temp_handler.php) (revision 7391) @@ -43,6 +43,14 @@ */ var $Conn; + + /** + * Window ID of current window + * + * @var mixed + */ + var $WindowID = ''; + function kTempTablesHandler() { parent::kBase(); @@ -70,12 +78,12 @@ */ function GetTempName($table) { - return $this->Application->GetTempName($table); + return $this->Application->GetTempName($table, $this->WindowID); } function GetTempTablePrefix() { - return $this->Application->GetTempTablePrefix(); + return $this->Application->GetTempTablePrefix($this->WindowID); } /** @@ -116,6 +124,8 @@ function BuildTables($prefix, $ids) { + $this->WindowID = $this->Application->GetVar('m_wid'); + $this->TableIdCounter = 0; $tables = Array( 'TableName' => $this->Application->getUnitOption($prefix, 'TableName'), @@ -125,12 +135,12 @@ 'TableId' => $this->TableIdCounter++, ); - $parent_prefix = $this->Application->getUnitOption($prefix, 'ParentPrefix'); + /*$parent_prefix = $this->Application->getUnitOption($prefix, 'ParentPrefix'); if ($parent_prefix) { $tables['ForeignKey'] = $this->Application->getUnitOption($prefix, 'ForeignKey'); $tables['ParentPrefix'] = $parent_prefix; $tables['ParentTableKey'] = $this->Application->getUnitOption($prefix, 'ParentTableKey'); - } + }*/ $this->FinalRefs[ $tables['TableName'] ] = $tables['TableId']; // don't forget to add main table to FinalRefs too