|
From: Paul S. O. <ps...@us...> - 2002-05-12 15:58:18
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv9802/includes
Modified Files:
Tag: phpBB-2_0_0
functions_search.php usercp_avatar.php usercp_register.php
Log Message:
Yep, more updates and fixes
Index: functions_search.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/functions_search.php,v
retrieving revision 1.8.2.2
retrieving revision 1.8.2.3
diff -C2 -r1.8.2.2 -r1.8.2.3
*** functions_search.php 30 Apr 2002 12:09:24 -0000 1.8.2.2
--- functions_search.php 12 May 2002 15:57:45 -0000 1.8.2.3
***************
*** 199,210 ****
case 'mysql':
case 'mysql4':
! $value_sql .= ( ( $value_sql != '' ) ? ', ' : '' ) . '(\'' . $word[$i] . '\')';
break;
case 'mssql':
! $value_sql .= ( ( $value_sql != '' ) ? ' UNION ALL ' : '' ) . "SELECT '" . $word[$i] . "'";
break;
default:
! $sql = "INSERT INTO " . SEARCH_WORD_TABLE . " (word_text)
! VALUES ('" . $word[$i] . "')";
if( !$db->sql_query($sql) )
{
--- 199,210 ----
case 'mysql':
case 'mysql4':
! $value_sql .= ( ( $value_sql != '' ) ? ', ' : '' ) . '(\'' . $word[$i] . '\', 0)';
break;
case 'mssql':
! $value_sql .= ( ( $value_sql != '' ) ? ' UNION ALL ' : '' ) . "SELECT '" . $word[$i] . "', 0";
break;
default:
! $sql = "INSERT INTO " . SEARCH_WORD_TABLE . " (word_text, word_common)
! VALUES ('" . $word[$i] . "', 0)";
if( !$db->sql_query($sql) )
{
***************
*** 222,230 ****
case 'mysql':
case 'mysql4':
! $sql = "INSERT IGNORE INTO " . SEARCH_WORD_TABLE . " (word_text)
VALUES $value_sql";
break;
case 'mssql':
! $sql = "INSERT INTO " . SEARCH_WORD_TABLE . " (word_text)
$value_sql";
break;
--- 222,230 ----
case 'mysql':
case 'mysql4':
! $sql = "INSERT IGNORE INTO " . SEARCH_WORD_TABLE . " (word_text, word_common)
VALUES $value_sql";
break;
case 'mssql':
! $sql = "INSERT INTO " . SEARCH_WORD_TABLE . " (word_text, word_common)
$value_sql";
break;
Index: usercp_avatar.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/usercp_avatar.php,v
retrieving revision 1.8.2.3
retrieving revision 1.8.2.4
diff -C2 -r1.8.2.3 -r1.8.2.4
*** usercp_avatar.php 12 May 2002 00:47:41 -0000 1.8.2.3
--- usercp_avatar.php 12 May 2002 15:57:45 -0000 1.8.2.4
***************
*** 163,167 ****
if ( $avatar_filesize <= $board_config['avatar_filesize'] && $avatar_filesize > 0 )
{
! preg_match("'image\/[x\-]*([a-z]+)'", $avatar_filetype, $avatar_filetype);
$avatar_filetype = $avatar_filetype[1];
}
--- 163,167 ----
if ( $avatar_filesize <= $board_config['avatar_filesize'] && $avatar_filesize > 0 )
{
! preg_match('#image\/[x\-]*([a-z]+)#', $avatar_filetype, $avatar_filetype);
$avatar_filetype = $avatar_filetype[1];
}
***************
*** 185,189 ****
if ( $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] )
{
! $new_filename = ( ( $current_avatar != '' && $current_type == USER_AVATAR_UPLOAD ) && $mode != 'register' ) ? $current_avatar : uniqid($user_ip) . $imgtype;
if ( $mode == 'editprofile' && $current_type == USER_AVATAR_UPLOAD && $current_avatar != '' )
--- 185,189 ----
if ( $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] )
{
! $new_filename = uniqid($user_ip) . $imgtype;
if ( $mode == 'editprofile' && $current_type == USER_AVATAR_UPLOAD && $current_avatar != '' )
Index: usercp_register.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/usercp_register.php,v
retrieving revision 1.20.2.7
retrieving revision 1.20.2.8
diff -C2 -r1.20.2.7 -r1.20.2.8
*** usercp_register.php 12 May 2002 00:47:41 -0000 1.20.2.7
--- usercp_register.php 12 May 2002 15:57:45 -0000 1.20.2.8
***************
*** 900,924 ****
// it works well :)
//
! if ( $userdata['user_allowavatar'] && ( $board_config['allow_avatar_upload'] || $board_config['allow_avatar_local'] || $board_config['allow_avatar_remote'] ) )
{
! $template->assign_block_vars('switch_avatar_block', array() );
!
! if ( $board_config['allow_avatar_upload'] && file_exists('./' . $board_config['avatar_path']) )
{
! if ( $form_enctype != '' )
{
! $template->assign_block_vars('switch_avatar_block.switch_avatar_local_upload', array() );
}
- $template->assign_block_vars('switch_avatar_block.switch_avatar_remote_upload', array() );
- }
! if ( $board_config['allow_avatar_remote'] )
! {
! $template->assign_block_vars('switch_avatar_block.switch_avatar_remote_link', array() );
! }
! if ( $board_config['allow_avatar_local'] && file_exists('./' . $board_config['avatar_gallery_path']) )
! {
! $template->assign_block_vars('switch_avatar_block.switch_avatar_local_gallery', array() );
}
}
--- 900,927 ----
// it works well :)
//
! if ( $mode != 'register' )
{
! if ( $userdata['user_allowavatar'] && ( $board_config['allow_avatar_upload'] || $board_config['allow_avatar_local'] || $board_config['allow_avatar_remote'] ) )
{
! $template->assign_block_vars('switch_avatar_block', array() );
!
! if ( $board_config['allow_avatar_upload'] && file_exists('./' . $board_config['avatar_path']) )
{
! if ( $form_enctype != '' )
! {
! $template->assign_block_vars('switch_avatar_block.switch_avatar_local_upload', array() );
! }
! $template->assign_block_vars('switch_avatar_block.switch_avatar_remote_upload', array() );
}
! if ( $board_config['allow_avatar_remote'] )
! {
! $template->assign_block_vars('switch_avatar_block.switch_avatar_remote_link', array() );
! }
! if ( $board_config['allow_avatar_local'] && file_exists('./' . $board_config['avatar_gallery_path']) )
! {
! $template->assign_block_vars('switch_avatar_block.switch_avatar_local_gallery', array() );
! }
}
}
|