|
From: Paul S. O. <ps...@us...> - 2001-12-21 02:22:09
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv12350
Modified Files:
profile.php
Log Message:
Admin send/view emails + fix avatar strangeness ... hopefully
Index: profile.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/profile.php,v
retrieving revision 1.155
retrieving revision 1.156
diff -C2 -r1.155 -r1.156
*** profile.php 2001/12/16 01:52:10 1.155
--- profile.php 2001/12/21 02:22:07 1.156
***************
*** 259,263 ****
}
! if( !empty($profiledata['user_viewemail']) )
{
$email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL ."=" . $profiledata['user_id']) : "mailto:" . $profiledata['user_email'];
--- 259,263 ----
}
! if( !empty($profiledata['user_viewemail']) || $userdata['user_level'] == ADMIN )
{
$email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL ."=" . $profiledata['user_id']) : "mailto:" . $profiledata['user_email'];
***************
*** 732,736 ****
$avatar_sql = ", user_avatar = '', user_avatar_type = " . USER_AVATAR_NONE;
}
! else if( $board_config['allow_avatar_upload'] && !$error )
{
//
--- 732,736 ----
$avatar_sql = ", user_avatar = '', user_avatar_type = " . USER_AVATAR_NONE;
}
! else if( ( $user_avatar_loc != "" || !empty($user_avatar_url) ) && $board_config['allow_avatar_upload'] && !$error )
{
//
***************
*** 748,752 ****
}
! if( $user_avatar_loc != "" && $board_config['allow_avatar_upload'] )
{
if( file_exists($user_avatar_loc) && ereg(".jpg$|.gif$|.png$", $user_avatar_name) )
--- 748,752 ----
}
! if( $user_avatar_loc != "" )
{
if( file_exists($user_avatar_loc) && ereg(".jpg$|.gif$|.png$", $user_avatar_name) )
***************
*** 824,828 ****
}
}
! else if( !empty($user_avatar_url) && $board_config['allow_avatar_upload'] )
{
//
--- 824,828 ----
}
}
! else if( !empty($user_avatar_url) )
{
//
***************
*** 960,990 ****
}
}
! else if( $board_config['allow_avatar_remote'] && !$error )
{
! if($user_avatar_remoteurl != "" && $avatar_sql == "")
{
! if( !preg_match("#^http:\/\/#i", $user_avatar_remoteurl) )
! {
! $user_avatar_remoteurl = "http://" . $user_avatar_remoteurl;
! }
! if( preg_match("#^http:\/\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+\/.*?\.(gif|jpg|png)$#is", $user_avatar_remoteurl) )
! {
! $avatar_sql = ", user_avatar = '$user_avatar_remoteurl', user_avatar_type = " . USER_AVATAR_REMOTE;
! }
! else
! {
! $error = true;
! $error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $lang['Wrong_remote_avatar_format'] : $lang['Wrong_remote_avatar_format'];
! }
}
! }
! else if( $board_config['allow_avatar_local'] && !$error )
! {
! if( $user_avatar_local != "" && $avatar_sql == "" )
{
! $avatar_sql = ", user_avatar = '$user_avatar_local', user_avatar_type = " . USER_AVATAR_GALLERY;
}
}
if( !$error )
--- 960,984 ----
}
}
! else if( $user_avatar_remoteurl != "" && $board_config['allow_avatar_remote'] && $avatar_sql == "" && !$error )
{
! if( !preg_match("#^http:\/\/#i", $user_avatar_remoteurl) )
{
! $user_avatar_remoteurl = "http://" . $user_avatar_remoteurl;
! }
! if( preg_match("#^http:\/\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+\/.*?\.(gif|jpg|png)$#is", $user_avatar_remoteurl) )
! {
! $avatar_sql = ", user_avatar = '$user_avatar_remoteurl', user_avatar_type = " . USER_AVATAR_REMOTE;
}
! else
{
! $error = true;
! $error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $lang['Wrong_remote_avatar_format'] : $lang['Wrong_remote_avatar_format'];
}
}
+ else if( $user_avatar_local != "" && $board_config['allow_avatar_local'] && $avatar_sql == "" && !$error )
+ {
+ $avatar_sql = ", user_avatar = '$user_avatar_local', user_avatar_type = " . USER_AVATAR_GALLERY;
+ }
if( !$error )
***************
*** 1339,1343 ****
while( $file = @readdir($dir) )
{
! if( $file != "." && $file != ".." && !is_file($file) && !is_link($file) )
{
$sub_dir = @opendir($board_config['avatar_gallery_path'] . "/" . $file);
--- 1333,1337 ----
while( $file = @readdir($dir) )
{
! if( $file != "." && $file != ".." && !is_file($board_config['avatar_gallery_path'] . "/" . $file) && !is_link($board_config['avatar_gallery_path'] . "/" . $file) )
{
$sub_dir = @opendir($board_config['avatar_gallery_path'] . "/" . $file);
***************
*** 1910,1914 ****
$user_lang = $row['user_lang'];
! if( $row['user_viewemail'] )
{
if( time() - $userdata['user_emailtime'] < $board_config['flood_interval'] )
--- 1904,1908 ----
$user_lang = $row['user_lang'];
! if( $row['user_viewemail'] || $userdata['user_level'] == ADMIN )
{
if( time() - $userdata['user_emailtime'] < $board_config['flood_interval'] )
|