Commit 8ac8a93e authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "No need to show a different message when setting profile icon to the default"

parents 32e6e6da 6e68097c
......@@ -264,7 +264,6 @@ $string['Title'] = 'Title';
$string['imagetitle'] = 'Image title';
$string['standardavatartitle'] = 'Standard or external avatar';
$string['standardavatarnote'] = 'Standard or external profile picture';
$string['usingnodefaultprofileicon'] = 'Now using no default profile picture';
$string['wrongfiletypeforblock'] = 'The file you uploaded was not the correct type for this block.';
// Unzip
......
......@@ -29,7 +29,7 @@ $settingsform = new Pieform(array(
'value' => get_string('Default', 'artefact.file'),
),
'delete' => array(
'type' => 'submit',
'type' => 'submit',
'value' => get_string('Delete', 'artefact.file'),
),
)
......@@ -292,15 +292,14 @@ function settings_submit_default(Pieform $form, $values) {
}
$USER->profileicon = $default;
$USER->commit();
$SESSION->add_ok_msg(get_string('profileiconsdefaultsetsuccessfully', 'artefact.file'));
redirect('/artefact/file/profileicons.php');
}
else {
$USER->profileicon = null;
$USER->commit();
$SESSION->add_info_msg(get_string('usingnodefaultprofileicon', 'artefact.file'));
}
$USER->commit();
$SESSION->add_ok_msg(get_string('profileiconsdefaultsetsuccessfully', 'artefact.file'));
redirect('/artefact/file/profileicons.php');
}
function settings_submit_delete(Pieform $form, $values) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment