Index: branches/5.0.x/core/kernel/db/db_event_handler.php =================================================================== diff -u -r12960 -r12970 --- branches/5.0.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 12960) +++ branches/5.0.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 12970) @@ -1,6 +1,6 @@ getPrefixSpecial().'] in '.($status_checked ? 'checkItemStatus' : 'CheckPermission').'', E_USER_WARNING); - $redirect_template = $this->Application->isAdmin ? 'no_permission' : $this->Application->ConfigValue('NoPermissionTemplate'); + $template = $this->Application->isAdmin ? 'no_permission' : $this->Application->ConfigValue('NoPermissionTemplate'); - $redirect_params = $this->Application->HttpQuery->getRedirectParams(true); - $redirect_params['no_amp'] = 1; - $next_template = $this->Application->HREF('', '', $redirect_params); + if (MOD_REWRITE) { + $redirect_params = Array ( + 'm_cat_id' => 0, + 'next_template' => urlencode('external:' . $_SERVER['REQUEST_URI']), + ); + } + else { + $redirect_params = Array ( + 'next_template' => $this->Application->GetVar('t'), + ); + } - $redirect_params = Array ( - 'm_cat_id' => 0, - 'next_template' => urlencode('external:' . $next_template), - ); - - $this->Application->Redirect($redirect_template, $redirect_params); + $this->Application->Redirect($template, $redirect_params); } } @@ -1351,7 +1354,7 @@ function OnEdit(&$event) { $this->setTempWindowID($event); - $this->StoreSelectedIDs($event); + $ids = $this->StoreSelectedIDs($event); $var_name = $event->getPrefixSpecial().'_file_pending_actions'.$this->Application->GetVar('m_wid'); $this->Application->RemoveVar($var_name); @@ -1360,7 +1363,9 @@ $temp->PrepareEdit(); - $event->redirect = false; + $event->SetRedirectParam('m_lang', $this->Application->GetDefaultLanguageId()); + $event->SetRedirectParam($event->getPrefixSpecial() . '_id', array_shift($ids)); + $event->SetRedirectParam('pass', 'all,' . $event->getPrefixSpecial()); } /** @@ -1610,17 +1615,18 @@ { $this->setTempWindowID($event); $this->clearSelectedIDs($event); + $this->Application->SetVar('m_lang', $this->Application->GetDefaultLanguageId()); $object =& $event->getObject( Array('skip_autoload' => true) ); $temp =& $this->Application->recallObject($event->Prefix.'_TempHandler', 'kTempTablesHandler'); $temp->PrepareEdit(); $object->setID(0); - $this->Application->SetVar($event->getPrefixSpecial().'_id',0); + $this->Application->SetVar($event->getPrefixSpecial().'_id', 0); $this->Application->SetVar($event->getPrefixSpecial().'_PreCreate', 1); - $event->redirect=false; + $event->redirect = false; } /**