mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Slight mod to avatar url rex, the rawurlencode seriously broke things so removed it ...
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@2730 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
df848a295c
commit
572989afb7
1 changed files with 2 additions and 3 deletions
|
@ -77,13 +77,12 @@ function user_avatar_gallery($mode, &$error, &$error_msg, $avatar_filename)
|
|||
|
||||
function user_avatar_url($mode, &$error, &$error_msg, $avatar_filename)
|
||||
{
|
||||
$avatar_filename = rawurlencode($avatar_filename);
|
||||
if ( !preg_match('#^http:\/\/#i', $avatar_filename) )
|
||||
if ( !preg_match('#^(http)|(ftp):\/\/#i', $avatar_filename) )
|
||||
{
|
||||
$avatar_filename = 'http://' . $avatar_filename;
|
||||
}
|
||||
|
||||
if ( !preg_match('#^(http:\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)*[a-z]+(:[0-9]+)*\/\.(gif|jpg|jpeg|png)$)#is', $avatar_filename) )
|
||||
if ( !preg_match('#^((http)|(ftp):\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)+[a-z]+(:[0-9]+)*\/.*?\.(gif|jpg|jpeg|png)$)#is', $avatar_filename) )
|
||||
{
|
||||
$error = true;
|
||||
$error_msg = ( !empty($error_msg) ) ? $error_msg . '<br />' . $lang['Wrong_remote_avatar_format'] : $lang['Wrong_remote_avatar_format'];
|
||||
|
|
Loading…
Add table
Reference in a new issue