mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 09:56:38 +02:00
Merge branch 'MDL-35637_m23' of git://github.com/markn86/moodle into MOODLE_23_STABLE
This commit is contained in:
commit
aa63be7f5f
1 changed files with 11 additions and 10 deletions
|
@ -239,7 +239,7 @@ function groups_update_group_icon($group, $data, $editform) {
|
|||
$context = get_context_instance(CONTEXT_COURSE, $group->courseid, MUST_EXIST);
|
||||
|
||||
//TODO: it would make sense to allow picture deleting too (skodak)
|
||||
|
||||
if (!empty($CFG->gdversion)) {
|
||||
if ($iconfile = $editform->save_temp_file('imagefile')) {
|
||||
if (process_new_icon($context, 'group', 'icon', $group->id, $iconfile)) {
|
||||
$DB->set_field('groups', 'picture', 1, array('id'=>$group->id));
|
||||
|
@ -251,6 +251,7 @@ function groups_update_group_icon($group, $data, $editform) {
|
|||
}
|
||||
@unlink($iconfile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue