mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'MDL-61215-master' of git://github.com/sarjona/moodle
This commit is contained in:
commit
d48a0a9a5d
8 changed files with 27 additions and 15 deletions
|
@ -165,7 +165,7 @@ $filemanagercontext = $editoroptions['context'];
|
|||
$filemanageroptions = array('maxbytes' => $CFG->maxbytes,
|
||||
'subdirs' => 0,
|
||||
'maxfiles' => 1,
|
||||
'accepted_types' => 'web_image');
|
||||
'accepted_types' => 'optimised_image');
|
||||
file_prepare_draft_area($draftitemid, $filemanagercontext->id, 'user', 'newicon', 0, $filemanageroptions);
|
||||
$user->imagefile = $draftitemid;
|
||||
// Create form.
|
||||
|
|
|
@ -145,7 +145,7 @@ $filemanagercontext = $editoroptions['context'];
|
|||
$filemanageroptions = array('maxbytes' => $CFG->maxbytes,
|
||||
'subdirs' => 0,
|
||||
'maxfiles' => 1,
|
||||
'accepted_types' => 'web_image');
|
||||
'accepted_types' => 'optimised_image');
|
||||
file_prepare_draft_area($draftitemid, $filemanagercontext->id, 'user', 'newicon', 0, $filemanageroptions);
|
||||
$user->imagefile = $draftitemid;
|
||||
// Create form.
|
||||
|
|
|
@ -574,7 +574,7 @@ class core_user_external extends external_api {
|
|||
$filemanageroptions = array('maxbytes' => $CFG->maxbytes,
|
||||
'subdirs' => 0,
|
||||
'maxfiles' => 1,
|
||||
'accepted_types' => 'web_image');
|
||||
'accepted_types' => 'optimised_image');
|
||||
|
||||
$transaction = $DB->start_delegated_transaction();
|
||||
|
||||
|
@ -1707,7 +1707,12 @@ class core_user_external extends external_api {
|
|||
throw new moodle_exception('noprofileedit', 'auth');
|
||||
}
|
||||
|
||||
$filemanageroptions = array('maxbytes' => $CFG->maxbytes, 'subdirs' => 0, 'maxfiles' => 1, 'accepted_types' => 'web_image');
|
||||
$filemanageroptions = array(
|
||||
'maxbytes' => $CFG->maxbytes,
|
||||
'subdirs' => 0,
|
||||
'maxfiles' => 1,
|
||||
'accepted_types' => 'optimised_image'
|
||||
);
|
||||
$user->deletepicture = $params['delete'];
|
||||
$user->imagefile = $params['draftitemid'];
|
||||
$success = core_user::update_picture($user, $filemanageroptions);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue