From f00530f7cbd06f06824a6ead0cd0a1e8258f594e Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 21 Nov 2014 13:37:49 +0000 Subject: [PATCH] use a wrapper on a different url for sending mail to be able to select a different fpm pool --- mail/inc/class.mail_compose.inc.php | 16 ++++++++++++++++ mail/js/app.js | 2 ++ 2 files changed, 18 insertions(+) diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php index a9164e8f0f..cdc3a7a021 100644 --- a/mail/inc/class.mail_compose.inc.php +++ b/mail/inc/class.mail_compose.inc.php @@ -3196,4 +3196,20 @@ class mail_compose $response->error(implode(',',$results['failed'])); } } + + /** + * Wrapper for etemplate_new::ajax_process_content to be able to identify send request to select different fpm pool + * + * @param string $etemplate_exec_id + * @param array $content + * @param boolean $no_validation + * @throws egw_exception_wrong_parameter + */ + static public function ajax_send($etemplate_exec_id, array $content, $no_validation) + { + // setting menuaction is required as it triggers different behavior eg. in egw_framework::window_close() + $_GET['menuaction'] = 'etemplate_new::ajax_process_content'; + + return etemplate_new::ajax_process_content($etemplate_exec_id, $content, $no_validation); + } } diff --git a/mail/js/app.js b/mail/js/app.js index 77a43acc0f..a1ef872785 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -174,6 +174,8 @@ app.classes.mail = AppJS.extend( ); break; case 'mail.compose': + // use a wrapper on a different url to be able to use a different fpm pool + et2.menuaction = 'mail_compose::ajax_send'; var that = this; this.mail_isMainWindow = false; this.compose_fieldExpander_init();