Index: branches/unlabeled/unlabeled-1.166.4/core/kernel/application.php =================================================================== diff -u -r6849 -r6862 --- branches/unlabeled/unlabeled-1.166.4/core/kernel/application.php (.../application.php) (revision 6849) +++ branches/unlabeled/unlabeled-1.166.4/core/kernel/application.php (.../application.php) (revision 6862) @@ -1036,15 +1036,15 @@ { if(!$t) $t = $this->GetVar('t'); // moved from kMainTagProcessor->T() - if ($this->GetVar('skip_last_template')) { + /*if ($this->GetVar('skip_last_template')) { $params['opener'] = 'p'; $this->SetVar('m_opener', 'p'); } if ($t == 'incs/close_popup') { // because this template closes the popup and we don't need popup mark here anymore $params['m_opener'] = 's'; - } + }*/ if( substr($t, -4) == '.tpl' ) $t = substr($t, 0, strlen($t) - 4 ); @@ -1074,19 +1074,15 @@ } if (getArrayValue($params, 'opener') == 'u') { - $opener_stack=$this->RecallVar('opener_stack'); - if($opener_stack) { - $opener_stack=unserialize($opener_stack); - if (count($opener_stack) > 0) { - list($index_file, $env) = explode('|', $opener_stack[count($opener_stack)-1]); - $ret = $this->BaseURL($prefix, $ssl).$index_file.'?'.ENV_VAR_NAME.'='.$env; - if( getArrayValue($params,'escape') ) $ret = addslashes($ret); - return $ret; - } - else { - //define('DBG_REDIRECT', 1); - $t = $this->GetVar('t'); - } + $wid = $this->Application->GetVar('m_wid'); + $opener_stack = $this->RecallVar(rtrim('opener_stack_'.$wid, '_')); + + if ($opener_stack && $opener_stack != serialize(Array())) { + $opener_stack = unserialize($opener_stack); + list($index_file, $env) = explode('|', $opener_stack[count($opener_stack) - 1]); + $ret = $this->BaseURL($prefix, $ssl).$index_file.'?'.ENV_VAR_NAME.'='.$env; + if ( getArrayValue($params,'escape') ) $ret = addslashes($ret); + return $ret; } else { //define('DBG_REDIRECT', 1);