Index: branches/unlabeled/unlabeled-1.39.8/core/kernel/event_manager.php =================================================================== diff -u -r6864 -r7036 --- branches/unlabeled/unlabeled-1.39.8/core/kernel/event_manager.php (.../event_manager.php) (revision 6864) +++ branches/unlabeled/unlabeled-1.39.8/core/kernel/event_manager.php (.../event_manager.php) (revision 7036) @@ -295,13 +295,13 @@ if ($event->redirect === true && !isset($event->redirect_params['pass_category']) && $this->Application->GetVar('m_cat_id')) { $event->redirect_params['pass_category'] = 1; } - + $wid = $this->Application->GetVar('m_wid'); if ($wid && $event->redirect_params['opener'] == 'u') { $event->redirect_params['opener'] = 's'; // because Application->HREF will react differently when 'opener' = 'u' $event->redirect = 'incs/close_popup'; } - + $this->Application->Redirect($event->redirect, $event->redirect_params, null, $event->redirect_script); } } @@ -313,10 +313,10 @@ function processOpener() { $wid = $this->Application->GetVar('m_wid'); - + $opener_stack = $this->Application->RecallVar(rtrim('opener_stack_'.$wid, '_')); $opener_stack = $opener_stack ? unserialize($opener_stack) : Array(); - + $opener_action = $this->Application->GetVar('m_opener'); switch ($opener_action) { case 'r': // "reset" opener stack @@ -342,8 +342,18 @@ $popup_wid = (int)$this->Application->RecallVar('last_wid') + 1; $this->Application->StoreVar('last_wid', $popup_wid); $this->Application->SetVar('m_wid', $popup_wid); - - $opener_stack = Array ( $this->Application->RecallVar(rtrim('last_template_popup_'.$parent_wid, '_')) ); + + if ($this->Application->GetVar('front')) { + $front_session =& $this->Application->recallObject('Session.front'); + + $last_template = $front_session->RecallVar(rtrim('last_template_popup_'.$parent_wid, '_')); + $last_template = '../'.$last_template; + } + else { + $last_template = $this->Application->RecallVar(rtrim('last_template_popup_'.$parent_wid, '_')); + } + + $opener_stack = Array ( $last_template ); $this->Application->SetVar('m_opener', 's'); $wid = $popup_wid; break; @@ -352,7 +362,7 @@ break; } - + $this->Application->SetVar('m_opener', 's'); $this->Application->StoreVar(rtrim('opener_stack_'.$wid, '_'), serialize($opener_stack)); } @@ -368,7 +378,7 @@ { $wid = $this->Application->GetVar('m_wid'); $stack_name = rtrim('opener_stack_'.$wid, '_'); - + $opener_stack = $this->Application->RecallVar($stack_name); $opener_stack = $opener_stack ? unserialize($opener_stack) : Array();