Fix not working forwarding multiple addresses in sieve edit dialog

This commit is contained in:
Hadi Nategh 2015-04-08 16:29:57 +00:00
parent 4be6ad6bed
commit 002ea7967a
2 changed files with 20 additions and 20 deletions

View File

@ -241,7 +241,7 @@ class mail_sieve
break; break;
case 'address': case 'address':
$content['action_address_text'][] = $rules['action_arg']; $content['action_address_text'] = explode(',', $rules['action_arg']);
break; break;
case 'reject': case 'reject':
$content['action_reject_text'] = $rules['action_arg']; $content['action_reject_text'] = $rules['action_arg'];
@ -288,7 +288,7 @@ class mail_sieve
$newRule['action_arg'] = translation::convert(implode($content['action_folder_text']), 'utf7-imap', 'utf-8'); $newRule['action_arg'] = translation::convert(implode($content['action_folder_text']), 'utf7-imap', 'utf-8');
break; break;
case 'address': case 'address':
$newRule['action_arg'] = implode($content['action_address_text']); $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; break;
case 'reject': case 'reject':

View File

@ -8,19 +8,16 @@
<column width="100%"/> <column width="100%"/>
</columns> </columns>
<rows> <rows>
<row disabled="!@msg">
<description id="msg" class="message"/>
</row>
<row> <row>
<groupbox> <groupbox>
<caption label="Condition"/> <caption label="Condition"/>
<grid> <grid width="100%">
<columns> <columns>
<column/> <column width="40%"/>
<column/> <column width="60%"/>
</columns> </columns>
<rows> <rows>
<row class="th"> <row>
<description value="Match:"/> <description value="Match:"/>
<menulist> <menulist>
<menupopup id="anyof"/> <menupopup id="anyof"/>
@ -28,15 +25,15 @@
</row> </row>
<row class="sieveRowActive"> <row class="sieveRowActive">
<description value="If from contains:(*)"/> <description value="If from contains:(*)"/>
<textbox id="from"/> <textbox id="from" class="et2_fullWidth"/>
</row> </row>
<row> <row>
<description value="If to contains:(*)"/> <description value="If to contains:(*)"/>
<textbox id="to"/> <textbox id="to" class="et2_fullWidth"/>
</row> </row>
<row> <row>
<description value="If subject contains:(*)"/> <description value="If subject contains:(*)"/>
<textbox id="subject"/> <textbox id="subject" class="et2_fullWidth"/>
</row> </row>
<row> <row>
<description value="If message size"/> <description value="If message size"/>
@ -53,7 +50,7 @@
<hbox> <hbox>
<textbox id="field"/> <textbox id="field"/>
<description value="Contains(*)"/> <description value="Contains(*)"/>
<textbox id="field_val"/> <textbox id="field_val" width="38%"/>
</hbox> </hbox>
</row> </row>
<row> <row>
@ -63,7 +60,7 @@
<menupopup id="bodytransform"/> <menupopup id="bodytransform"/>
</menulist> </menulist>
<description value="Contains(*)"/> <description value="Contains(*)"/>
<textbox id="field_bodytransform"/> <textbox id="field_bodytransform" width="62%"/>
</hbox> </hbox>
</row> </row>
<row> <row>
@ -73,7 +70,7 @@
<menupopup id="ctype"/> <menupopup id="ctype"/>
</menulist> </menulist>
<description value="/"/> <description value="/"/>
<textbox blur="for eg.: mpeg" id="field_ctype_val"/> <textbox blur="for eg.: mpeg" id="field_ctype_val" width="71%"/>
</hbox> </hbox>
</row> </row>
</rows> </rows>
@ -84,7 +81,7 @@
<row> <row>
<groupbox> <groupbox>
<caption label="Action"/> <caption label="Action"/>
<grid> <grid width="100%">
<columns> <columns>
<column/> <column/>
<column/> <column/>
@ -93,23 +90,26 @@
<row> <row>
<radio label="File into:" id="action" options="folder"/> <radio label="File into:" id="action" options="folder"/>
<hbox> <hbox>
<taglist id="action_folder_text" width="40%" autocomplete_url="mail.mail_sieve.ajax_getFolders" autocomplete_params="" allowFreeEntries="false" maxSelection="1" onfocus="app.mail.sieve_focus_radioBtn" /> <taglist id="action_folder_text" class="et2_fullWidth" autocomplete_url="mail.mail_sieve.ajax_getFolders" autocomplete_params="" allowFreeEntries="false" maxSelection="1" onfocus="app.mail.sieve_focus_radioBtn" />
</hbox> </hbox>
</row> </row>
<row> <row>
<radio label="Forward to address:" id="action" options="address"/> <radio label="Forward to address (*):" id="action" options="address"/>
<hbox> <hbox>
<taglist-email allowFreeEntries="true" id="action_address_text" width="40%" maxSelection="1" onfocus="app.mail.sieve_focus_radioBtn" /> <taglist-email allowFreeEntries="true" id="action_address_text" class="et2_fullWidth" onfocus="app.mail.sieve_focus_radioBtn" />
</hbox> </hbox>
</row> </row>
<row> <row>
<radio label="Send a reject message:" id="action" options="reject"/> <radio label="Send a reject message:" id="action" options="reject"/>
<textbox multiline="true" id="action_reject_text" onfocus="app.mail.sieve_focus_radioBtn" /> <textbox multiline="true" id="action_reject_text" onfocus="app.mail.sieve_focus_radioBtn" width="100%" height="100" />
</row> </row>
<row> <row>
<radio label="Discard message" id="action" options="discard"/> <radio label="Discard message" id="action" options="discard"/>
<description/> <description/>
</row> </row>
<row>
<description value="(*) Please consider, forward to multiple addresses will not work if number of addresses exceeds the limit, which in must mail servers the limit is 4 by default, please contact your mail server administrator for further info."/>
</row>
</rows> </rows>
</grid> </grid>
</groupbox> </groupbox>