From c58716b64d589e8726174cc8efe6c347883fb51b Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 10 Oct 2013 14:07:50 +0000 Subject: [PATCH] Set the right value for action_folder_text/taglist in sieve->edit popup window --- mail/inc/class.mail_sieve.inc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mail/inc/class.mail_sieve.inc.php b/mail/inc/class.mail_sieve.inc.php index a8a212d492..2c7291e41c 100644 --- a/mail/inc/class.mail_sieve.inc.php +++ b/mail/inc/class.mail_sieve.inc.php @@ -248,8 +248,7 @@ class mail_sieve switch ($rules['action']) { case 'folder': - - $content['action_folder_text'][] =$rules['action_arg']; + $content['action_folder_text'][] = translation::convert($rules['action_arg'],'utf-8','utf7-imap'); break; case 'address': @@ -304,7 +303,7 @@ class mail_sieve break; case 'address': $newRule['action_arg'] = implode($content['action_address_text']); - error_log(__METHOD__. '() newRules_address '. array2string($newRule['action_arg'])); + //error_log(__METHOD__. '() newRules_address '. array2string($newRule['action_arg'])); break; case 'reject': $newRule['action_arg'] = $content['action_reject_text']; @@ -377,6 +376,9 @@ class mail_sieve ); //$preserv = $sel_options; error_log(__METHOD__.'() content'. array2string($content)); + //Set the preselect_options for mail/folders as we are not allow free entry for folder taglist + $mailCompose = new mail_compose(); + $sel_options['action_folder_text'] = $mailCompose->ajax_searchFolder(0,true); return $etmpl->exec('mail.mail_sieve.edit',$content,$sel_options,$readonlys,$preserv,2);