Skip to content

Commit f798aa0

Browse files
committed
- Implemented FS#3310 - add support for multiple email addresses in send copy to field (patch).
1 parent a01d1a3 commit f798aa0

File tree

14 files changed

+32
-9
lines changed

14 files changed

+32
-9
lines changed

interface/lib/classes/tform.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1302,7 +1302,7 @@ function getAuthSQL($perm, $table = '') {
13021302
$perm = $app->db->quote($perm);
13031303
$table = $app->db->quote($table);
13041304

1305-
if($_SESSION["s"]["user"]["typ"] == 'admin') {
1305+
if($_SESSION["s"]["user"]["typ"] == 'admin' || $_SESSION['s']['user']['mailuser_id'] > 0) {
13061306
return '1';
13071307
} else {
13081308
if ($table != ''){

interface/web/mail/form/mail_user.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
'type' => 'TOLOWER')
161161
),
162162
'validators' => array ( 0 => array ( 'type' => 'REGEX',
163-
'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}$/i',
163+
'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}(,\s*\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,}$/i',
164164
'errmsg'=> 'cc_error_isemail'),
165165
),
166166
'default' => '',

interface/web/mail/lib/lang/de_mail_user.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,5 @@ $wb['repeat_password_txt'] = 'Passwort wiederholen';
4848
$wb['password_mismatch_txt'] = 'Die Passwörter stimmen nicht überein.';
4949
$wb['password_match_txt'] = 'Die Passwörter stimmen überein.';
5050
$wb['email_error_isascii'] = 'Bitte verwenden Sie keine Umlaute im Passwort. Dies kann zu Problemen mit Ihrem E-Mail-Programm führen.';
51+
$wb['cc_note_txt'] = '(Mehrere E-Mail-Adressen mit Kommas trennen)';
5152
?>

interface/web/mail/lib/lang/en_mail_user.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,5 @@ $wb['repeat_password_txt'] = 'Repeat Password';
4848
$wb['password_mismatch_txt'] = 'The passwords do not match.';
4949
$wb['password_match_txt'] = 'The passwords do match.';
5050
$wb['email_error_isascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';
51+
$wb['cc_note_txt'] = '(Separate multiple email addresses with commas)';
5152
?>

interface/web/mail/templates/mail_user_mailbox_edit.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ <h2><tmpl_var name="list_head_txt"></h2>
4242
</div>
4343
<div class="ctrlHolder">
4444
<label for="name">{tmpl_var name='cc_txt'}</label>
45-
<input name="cc" id="cc" value="{tmpl_var name='cc'}" size="30" maxlength="255" type="text" class="textInput" /> &nbsp; {tmpl_var name='name_optional_txt'}
45+
<input name="cc" id="cc" value="{tmpl_var name='cc'}" size="30" maxlength="255" type="text" class="textInput" /> &nbsp; {tmpl_var name='name_optional_txt'} {tmpl_var name='cc_note_txt'}
4646
</div>
4747
<div class="ctrlHolder">
4848
<label for="policy">{tmpl_var name='policy_txt'}</label>

interface/web/mailuser/form/mail_user_cc.tform.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
'type' => 'TOLOWER')
7070
),
7171
'validators' => array ( 0 => array ( 'type' => 'REGEX',
72-
'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-z\-]{2,10}){0,1}$/i',
72+
//'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-z\-]{2,10}){0,1}$/i',
73+
'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}(,\s*\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,}$/i',
7374
'errmsg'=> 'cc_error_isemail'),
7475
),
7576
'default' => '',

interface/web/mailuser/lib/lang/de_mail_user_cc.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ $wb['cc_txt'] = 'Kopie senden an';
44
$wb['email_txt'] = 'E-Mail';
55
$wb['cc_error_isemail'] = 'E-Mail Adresse ungültig im -Kopie senden an- Feld';
66
$wb['email_is_cc_error'] = 'E-Mail Adresse und ';
7+
$wb['name_optional_txt'] = '(optional)';
8+
$wb['cc_note_txt'] = '(Mehrere E-Mail-Adressen mit Kommas trennen)';
79
?>

interface/web/mailuser/lib/lang/en_mail_user_cc.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ $wb["cc_txt"] = 'Send copy to';
44
$wb["email_txt"] = 'Email';
55
$wb["cc_error_isemail"] = 'Email address invalid in -Send copy to- field';
66
$wb["email_is_cc_error"] = 'Email address and send copy to address can not be the same.';
7+
$wb["name_optional_txt"] = '(Optional)';
8+
$wb['cc_note_txt'] = '(Separate multiple email addresses with commas)';
79
?>

interface/web/mailuser/mail_user_spamfilter_edit.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@
5151
class page_action extends tform_actions {
5252

5353
function onShow() {
54-
54+
global $app;
55+
5556
$this->id = $app->functions->intval($_SESSION['s']['user']['mailuser_id']);
5657

5758
parent::onShow();

interface/web/mailuser/templates/mail_user_cc_edit.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ <h2><tmpl_var name="list_head_txt"></h2>
1111
</div>
1212
<div class="ctrlHolder">
1313
<label for="name">{tmpl_var name='cc_txt'}</label>
14-
<input name="cc" id="cc" value="{tmpl_var name='cc'}" size="30" maxlength="255" type="text" class="textInput" /> &nbsp; {tmpl_var name='name_optional_txt'}
14+
<input name="cc" id="cc" value="{tmpl_var name='cc'}" size="30" maxlength="255" type="text" class="textInput" /> &nbsp; {tmpl_var name='name_optional_txt'} {tmpl_var name='cc_note_txt'}
1515
</div>
1616
</fieldset>
1717

0 commit comments

Comments
 (0)