Index: branches/RC/core/kernel/utility/temp_handler.php =================================================================== diff -u -N -r11892 -r11923 --- branches/RC/core/kernel/utility/temp_handler.php (.../temp_handler.php) (revision 11892) +++ branches/RC/core/kernel/utility/temp_handler.php (.../temp_handler.php) (revision 11923) @@ -1,6 +1,6 @@ MasterTable . '$/'; $my_sid = $this->Application->GetSID(); + $my_wid = $this->Application->GetVar('m_wid'); $ids = implode(',', isset($ids) ? $ids : $this->Tables['IDs']); $sids = Array (); if (!$ids) { @@ -803,7 +804,17 @@ if ( preg_match($mask_edit_table, $table, $rets) ) { $sid = preg_replace('/(.*)_(.*)/', '\\1', $rets[1]); // remove popup's wid from sid if ($sid == $my_sid) { - continue; + if ($my_wid) { + // using popups for editing + if (preg_replace('/(.*)_(.*)/', '\\2', $rets[1]) == $my_wid) { + // don't count window, that is being opened right now + continue; + } + } + else { + // not using popups for editing -> don't count my session tables + continue; + } } $sql = 'SELECT COUNT(' . $this->Tables['IdField'] . ')