Index: branches/RC/core/kernel/processors/main_processor.php =================================================================== diff -u -N -r9581 -r9841 --- branches/RC/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 9581) +++ branches/RC/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 9841) @@ -934,12 +934,17 @@ // check by belonging to group: end if ((!$this->Application->LoggedIn() || !$group_access) && $condition) { + $redirect_params = $this->Application->HttpQuery->getRedirectParams(); + $redirect_params['next_template'] = $t; + + if (array_key_exists('pass_category', $params)) { + $redirect_params['pass_category'] = $params['pass_category']; + } + if ( $this->Application->LoggedIn() && !$group_access) { - $this->Application->Redirect( $params['no_group_perm_template'], Array('next_template'=>$t) ); + $this->Application->Redirect( $params['no_group_perm_template'], $redirect_params); } - $redirect_params = $this->Application->HttpQuery->getRedirectParams(); - $redirect_params['next_template'] = $t; $this->Application->Redirect($params['login_template'], $redirect_params); } } Index: branches/RC/core/units/users/users_event_handler.php =================================================================== diff -u -N -r9639 -r9841 --- branches/RC/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 9639) +++ branches/RC/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 9841) @@ -251,6 +251,7 @@ } $event->SetRedirectParam('pass', 'all'); +// $event->SetRedirectParam('pass_category', 1); // to test } /** @@ -1241,7 +1242,7 @@ $this->Conn->Query($q); } $this->clearSelectedIDs($event); - } + } /** * Checks, that currently loaded item is allowed for viewing (non permission-based) Index: branches/RC/core/units/general/helpers/permissions_helper.php =================================================================== diff -u -N -r8929 -r9841 --- branches/RC/core/units/general/helpers/permissions_helper.php (.../permissions_helper.php) (revision 8929) +++ branches/RC/core/units/general/helpers/permissions_helper.php (.../permissions_helper.php) (revision 9841) @@ -366,10 +366,18 @@ $t = $next_t; } + $redirect_params = $this->Application->HttpQuery->getRedirectParams(); + + if (array_key_exists('pass_category', $params)) { + $redirect_params['pass_category'] = $params['pass_cateogry']; + } + if (!$this->Application->LoggedIn()) { $redirect_template = $params['login_template']; - if (!$redirect_template && $this->Application->IsAdmin()) $redirect_template = 'login'; - $redirect_params = Array('next_template' => $t); + if (!$redirect_template && $this->Application->IsAdmin()) { + $redirect_template = 'login'; + } + $redirect_params['next_template'] = $t; } else { if (isset($params['no_permissions_template'])) { @@ -379,7 +387,11 @@ $redirect_template = $this->Application->IsAdmin() ? 'no_permission' : $this->Application->ConfigValue('NoPermissionTemplate'); } - $redirect_params = $this->Application->isDebugMode() ? Array('from_template' => 1, 'perms' => $params[ isset($params['permissions']) ? 'permissions' : 'perm_event'], 'next_template' => $t) : Array(); + if ($this->Application->isDebugMode()) { + $redirect_params['from_template'] = 1; + $redirect_params['perms'] = $params[ isset($params['permissions']) ? 'permissions' : 'perm_event' ]; + $redirect_params['next_template'] = $t; + } } if (isset($params['index_file']) && $params['index_file']) {