[ticket/9504] Allow whitespaces in gallery avatars

Gallery avatars are discovered on the server filesystem; to allow linking to
the images, the filenames are urlencoded before being written to the database.
However, getimagesize needs the decoded filename as input.

PHPBB3-9504
This commit is contained in:
Henry Sudhof 2010-07-02 13:41:52 +02:00 committed by Andreas Fischer
parent b7ae0fe4e9
commit 8690d25b4f

View file

@ -2348,7 +2348,7 @@ function avatar_process_user(&$error, $custom_userdata = false)
}
else
{
list($sql_ary['user_avatar_width'], $sql_ary['user_avatar_height']) = getimagesize($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category . '/' . $sql_ary['user_avatar']);
list($sql_ary['user_avatar_width'], $sql_ary['user_avatar_height']) = getimagesize($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category . '/' . urldecode($sql_ary['user_avatar']));
$sql_ary['user_avatar'] = $category . '/' . $sql_ary['user_avatar'];
}
}