mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #08101
[Bug 924777] A change has been merged
Reviewed: https://reviews.mahara.org/1035
Committed: http://gitorious.org/mahara/mahara/commit/ab3b5a19ee7103ae3f9761376fc5cc8dff8904d4
Submitter: Francois Marier (francois@xxxxxxxxxxxxxxx)
Branch: master
commit ab3b5a19ee7103ae3f9761376fc5cc8dff8904d4
Author: Richard Mansfield <richard.mansfield@xxxxxxxxxxxxxxx>
Date: Thu Feb 2 16:08:54 2012 +1300
Fix remote avatars broken by 'profileiconbyid' commit (bug #924777)
Commit 011c503965 changed lot of thumb.php urls to use the
type=profileiconbyid parameter (which takes an artefact id) rather
than type=profileicon (which takes a user id, and which cannot be
cached).
Unfortunately, when a user has no locally stored profile icon, use of
type=profileiconbyid stops their remote gravatar image from being
displayed.
This commit updates the thumb.php urls that were changed in commit
011c503965 to use the profile_icon_url() function, which respects
remote avatars when no local profileicon is available.
In some cases this requires a new size of the no_userphoto.png image,
so three new sizes are added in the raw theme. The four no_userphoto
images in the custom theme were duplicates of those in raw, and are
removed.
Finally, the type=profileiconbyid change from commit 011c503965 in the
viewacl.tpl template has been reverted back to type=profileicon.
Because this url is constructed in javascript, it is not worth the
trouble to use a profile_icon_url call here until the number of
requests to thumb.php really becomes a problem.
Change-Id: I7dce7090842999fe090dc2d8c481cb4aca7720d5
Signed-off-by: Richard Mansfield <richard.mansfield@xxxxxxxxxxxxxxx>
--
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:
Fix Released
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