mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #08064
[Bug 924777] Re: commit 011c5039656b4d22a08c7aa8da70abffa5fa8b52 on master broke our local remote avatars
** Attachment added: "details of commit"
https://bugs.launchpad.net/bugs/924777/+attachment/2705117/+files/commit-011c503
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/924777
Title:
commit 011c5039656b4d22a08c7aa8da70abffa5fa8b52 on master broke our
local remote avatars
Status in Mahara ePortfolio:
New
Bug description:
Hello,
Using lastest Mahara 1.5dev from master at gitorious
We git pulled yesterday the latest changes from master and found that
all displaying of user's profile icon via a call to thumb.php were now
broken and display an 'not found' icon.
We are using a local remote gravatar server (running with the usual gravatar protocol, i.e via a md5 of user's email) and everything was working OK until we merged the commit 011c5039656b4d22a08c7aa8da70abffa5fa8b52
Author: Richard Mansfield <richard.mansfield@xxxxxxxxxxxxxxx>
Date: Thu Jan 12 17:25:56 2012 +1300
This is due to the fact that since we have a local gravatar server,
none of our 7500 users bother to upload a profile icon to their
profile and thus have NULL in the column profilicon of the table usr.
We even advised them not to do so !
Previously it worked since thumb.php was called with type=profileicon
and id= $user->id (never empty) so there was a DB request to fetch
user's email that was later passed to the remote avatar fetching call
.
Now that type is profileiconbyid , and id is now usr->profileicon,
that is almost always empty, the database call DO not occurs and the
user's email is not fetched, so it stays null and the following
critical call is not executed ...
// Look for an appropriate image on gravatar.com
if ($useremail and $gravatarurl = remote_avatar($useremail, $size, $notfound)) {
redirect($gravatarurl);
}
Displaying profile icons still works when code generate the img src value by a call to profile_icon_url function like in group, user ... lists but not anymore when code make use of an img src="https://mymahara/thumb.php?xxxxx
Cheers
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/924777/+subscriptions
References