diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-21 03:14:28 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-21 03:14:28 +0000 |
commit | bb2713fad75de0f63c1865f64b04ed69040f4ca3 (patch) | |
tree | baeca48a0333f74f6bc48a6ab00cf2d7d93922bc /engine/lib | |
parent | f26d7d47986222c0f3a4038f7bc8d73c37f8ca4e (diff) | |
download | elgg-bb2713fad75de0f63c1865f64b04ed69040f4ca3.tar.gz elgg-bb2713fad75de0f63c1865f64b04ed69040f4ca3.tar.bz2 |
fixed caching of user avatars
git-svn-id: http://code.elgg.org/elgg/trunk@8384 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/users.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php index ec72b3c4d..a78b9565b 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -1265,7 +1265,7 @@ function user_avatar_hook($hook, $entity_type, $returnvalue, $params) { $size = $params['size']; if (isset($user->icontime)) { - return "pg/avatar/view/$user->username?size=$size"; + return "pg/avatar/view/$user->username/$size/$user->icontime"; } else { return "_graphics/icons/user/default{$size}.gif"; } @@ -1400,17 +1400,20 @@ function elgg_profile_fields_setup() { /** * Avatar page handler * + * /pg/avatar/edit/<username> + * /pg/avatar/view/<username>/<size>/<icontime> + * * @param array $page */ function elgg_avatar_page_handler($page) { global $CONFIG; - $user = get_user_by_username($page[1]); - elgg_set_page_owner_guid($user->guid); + set_input('username', $page[1]); if ($page[0] == 'edit') { require_once("{$CONFIG->path}pages/avatar/edit.php"); } else { + set_input('size', $page[2]); require_once("{$CONFIG->path}pages/avatar/view.php"); } } |