mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Now users, if allowed, can select their prefered email encoding.
Merged from MOODLE_16_UTF8. Abandoning the branch.
This commit is contained in:
parent
2bc0b7a0c4
commit
2b2b378f7f
@ -134,6 +134,24 @@ if (isadmin()) {
|
||||
choose_from_menu ($choices, "mailformat", $user->mailformat, "") ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if (!empty($CFG->allowusermailcharset)) { ?>
|
||||
<tr>
|
||||
<th><?php print_string("emailcharset") ?>:</th>
|
||||
<td><?php
|
||||
$mailcharset = get_user_preferences('mailcharset', '0', $user->id);
|
||||
unset($choices);
|
||||
unset($charsets);
|
||||
$charsets = get_list_of_charsets();
|
||||
if (!empty($CFG->sitemailcharset)) {
|
||||
$choices['0'] = get_string('site').' ('.$CFG->sitemailcharset.')';
|
||||
} else {
|
||||
$choices['0'] = get_string('default').' ('.current_charset().')';
|
||||
}
|
||||
$choices = array_merge($choices, $charsets);
|
||||
choose_from_menu($choices, 'mailcharset', $mailcharset, ''); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<th><?php print_string('emaildigest') ?>:</th>
|
||||
<td><?php
|
||||
|
@ -95,6 +95,14 @@
|
||||
|
||||
$usernew->maildisplay = clean_param($usernew->maildisplay, PARAM_INT);
|
||||
$usernew->mailformat = clean_param($usernew->mailformat, PARAM_INT);
|
||||
if ($CFG->allowusermailcharset) {
|
||||
$usernew->mailcharset = clean_param($usernew->mailcharset, PARAM_CLEAN);
|
||||
if (!empty($usernew->mailcharset)) {
|
||||
set_user_preference('mailcharset', $usernew->mailcharset, $user->id);
|
||||
}
|
||||
} else {
|
||||
unset_user_preference('mailcharset', $user->id);
|
||||
}
|
||||
$usernew->maildigest = clean_param($usernew->maildigest, PARAM_INT);
|
||||
$usernew->autosubscribe = clean_param($usernew->autosubscribe, PARAM_INT);
|
||||
if (!empty($CFG->htmleditor)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user