Opened 16 years ago
Closed 16 years ago
#265 closed defect (bug) (fixed)
Windows users have path saved as group avatar hrefs
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | minor | |
Severity: | Version: | ||
Component: | Keywords: | ||
Cc: |
Description
On windws when a user creates a group, the ABSPATH is saved as the href for the two avatars not the $bploggedin_domain? + path to the avs.
Problem is that in groups_get_avatar_hrefs() the ABSPATH is 'C:\wamp\www/' and the two avs V1 and V1 are coming through to the function as 'C:
wamp
www/wp-content/blo..' from bp_core_avatar_cropstore().
groups_get_avatar_hrefs() is supposed to replace the ABSPATH with the loggedin_domain. No match found so whatever was there stays there and the href gets turned into an ABSPATH+path to the avs.
So bp_core_avatar_cropstore() is either getting them whacky or making the paths so.
To tired to play any more this morn and find out further. Whatever happened to debugging with breakpoints, inspecting vars, watches and things like that?
Attachments (3)
Change History (14)
#1
@
16 years ago
- Resolution set to fixed
- Status changed from new to closed
Fixed. Added the stripslashes function around $_POSTorig? in bp-core-avatars.php. This removes double slashes added on Windows servers for the local path to the avatar.
Updated line is 159, file attached.
#5
@
16 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Thanks for the fix, but don't set the bug as 'fixed' until it has been integrated into the core.
#7
@
16 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Supplied patch was for similar profile avatar problem. Re-opening to fix the group avatar issue which is what this ticket was for initially.
#8
@
16 years ago
Thanks for the fix, any chance you can submit a patch/diff file, or highlight the lines that you have changed?
#9
@
16 years ago
Sorry, added stripslashes on the following lines:
1156: $thumb_href = str_replace( ABSPATH, $src, stripslashes($avatarsv1_out?) );
1157: $full_href = str_replace( ABSPATH, $src, stripslashes($avatarsv2_out?) );
1281: $group_obj->avatar_thumb = stripslashes($avatar_hrefsthumb_href?);
1282: $group_obj->avatar_full = stripslashes($avatar_hrefsfull_href?);
#10
@
16 years ago
Lines have changed to this:
1224: $thumb_href = str_replace( ABSPATH, $src, stripslashes($avatarsv1_out?) );
1225: $full_href = str_replace( ABSPATH, $src, stripslashes($avatarsv2_out?) );
1349: $group_obj->avatar_thumb = stripslashes($avatar_hrefsthumb_href?);
1350: $group_obj->avatar_full = stripslashes($avatar_hrefsfull_href?);
updated bp-core-avatars.php