MDL-21676 user: minor gravatar fixes

This commit is contained in:
Eloy Lafuente (stronk7)
2011-09-20 12:43:00 +02:00
parent 4125bdc139
commit ed9e0cb6ec
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ class user_edit_form extends moodleform {
if (!empty($CFG->gdversion)) {
$context = get_context_instance(CONTEXT_USER, $user->id, MUST_EXIST);
$fs = get_file_storage();
$hasuploadedpicture = (!$fs->file_exists($context->id, 'user', 'icon', 0, '/', 'f2.png') && !$fs->file_exists($context->id, 'user', 'icon', 0, '/', 'f2.jpg'));
$hasuploadedpicture = ($fs->file_exists($context->id, 'user', 'icon', 0, '/', 'f2.png') || $fs->file_exists($context->id, 'user', 'icon', 0, '/', 'f2.jpg'));
if (!empty($user->picture) && $hasuploadedpicture) {
$imagevalue = $OUTPUT->user_picture($user, array('courseid' => SITEID, 'size'=>64));
} else {
+1 -1
View File
@@ -104,7 +104,7 @@ class user_editadvanced_form extends moodleform {
if ($user) {
$context = get_context_instance(CONTEXT_USER, $user->id, MUST_EXIST);
$fs = get_file_storage();
$hasuploadedpicture = (!$fs->file_exists($context->id, 'user', 'icon', 0, '/', 'f2.png') && !$fs->file_exists($context->id, 'user', 'icon', 0, '/', 'f2.jpg'));
$hasuploadedpicture = ($fs->file_exists($context->id, 'user', 'icon', 0, '/', 'f2.png') || $fs->file_exists($context->id, 'user', 'icon', 0, '/', 'f2.jpg'));
if (!empty($user->picture) && $hasuploadedpicture) {
$imagevalue = $OUTPUT->user_picture($user, array('courseid' => SITEID, 'size'=>64));
} else {
+1 -1
View File
@@ -263,7 +263,7 @@ function useredit_shared_definition(&$mform, $editoroptions = null) {
$mform->addElement('header', 'moodle_picture', get_string('pictureofuser'));
if (!empty($CFG->enablegravatar)) {
$mform->addElement('static', 'gravatarenabled', get_string('gravatarenabled'));
$mform->addElement('html', html_writer::tag('p', get_string('gravatarenabled')));
}
$mform->addElement('static', 'currentpicture', get_string('currentpicture'));