Index: trunk/core/kernel/processors/main_processor.php =================================================================== diff -u -N -r7702 -r7855 --- trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 7702) +++ trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 7855) @@ -835,11 +835,8 @@ $this->Application->Redirect( $params['no_group_perm_template'], Array('next_template'=>$t) ); } - $redirect_params = Array('next_template' => $t); - $session_expired = $this->Application->GetVar('expired'); - if ($session_expired) { - $redirect_params['expired'] = $session_expired; - } + $redirect_params = $this->Application->HttpQuery->getRedirectParams(); + $redirect_params['next_template'] = $t; $this->Application->Redirect($params['login_template'], $redirect_params); } } @@ -940,12 +937,19 @@ return $this->Application->Phrase($root_phrase); } + /** + * Allows to attach file directly from email event template + * + * @param Array $params + */ function AttachFile($params) { - $email_object =& $this->Application->recallObject('kEmailMessage'); + $esender =& $application->recallObject('EmailSender'.(isset($params['special']) ? '.'.$params['special'] : '')); + /* @var $esender kEmailSendingHelper */ + $path = FULL_PATH.'/'.$params['path']; if (file_exists($path)) { - $email_object->attachFile($path); + $esender->AddAttachment($path); } }