From 113d415a4effcea01b89f79d7340aa8e84ebb43c Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 3 Jun 2015 13:25:22 +0000 Subject: [PATCH] Fix translation and appIcon issue in mail integration --- mail/inc/class.mail_integration.inc.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mail/inc/class.mail_integration.inc.php b/mail/inc/class.mail_integration.inc.php index 7ffa57acc5..bb9dd89f99 100644 --- a/mail/inc/class.mail_integration.inc.php +++ b/mail/inc/class.mail_integration.inc.php @@ -76,15 +76,14 @@ class mail_integration { $time = time(); $_date = egw_time::server2user($time->now,'ts'); } - + $GLOBALS['egw_info']['flags']['currentapp'] = $app; + // Integrate not yet saved mail if (empty($_GET['rowid']) && $_to_emailAddress && $app) { $sessionLocation = 'mail'; $mailbox = base64_decode($_GET['mailbox']); - $GLOBALS['egw_info']['flags']['currentapp'] = $app; - if (!($GLOBALS['egw_info']['user']['preferences'][$sessionLocation]['saveAsOptions']==='text_only')&&is_array($_attachments)) { // initialize mail open connection requirements @@ -283,7 +282,11 @@ class mail_integration { // Get the registered hook method of requested app for integration $hook = $GLOBALS['egw']->hooks->single(array('location' => 'mail_import'),$app); - + + // Load translation for the app since the original URL + // is from mail integration and only loads mail translation + translation::add_app($app); + // Execute import mail with provided content ExecMethod($hook['menuaction'],array ( 'addresses' => $data_addresses,