|
From: Paul S. O. <ps...@us...> - 2002-05-12 00:47:44
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv6987/includes
Modified Files:
Tag: phpBB-2_0_0
bbcode.php functions.php page_header.php page_tail.php
usercp_activate.php usercp_avatar.php usercp_register.php
Log Message:
Loads of bug fixes and updates
Index: bbcode.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/bbcode.php,v
retrieving revision 1.36.2.4
retrieving revision 1.36.2.5
diff -C2 -r1.36.2.4 -r1.36.2.5
*** bbcode.php 24 Apr 2002 14:42:15 -0000 1.36.2.4
--- bbcode.php 12 May 2002 00:47:40 -0000 1.36.2.5
***************
*** 607,611 ****
// xxxx can only be alpha characters.
// yyyy is anything up to the first space, newline, or comma.
! $ret = preg_replace("#([\n ])([a-z]+?)://([^,\t \n\r]+)#i", "\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>", $ret);
// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
--- 607,611 ----
// xxxx can only be alpha characters.
// yyyy is anything up to the first space, newline, or comma.
! $ret = preg_replace("#([\n ])([a-z]+?)://([^,\t <\n\r]+)#i", "\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>", $ret);
// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
***************
*** 615,619 ****
// This is slightly restrictive - it's not going to match stuff like "forums.foo.com"
// This is to keep it from getting annoying and matching stuff that's not meant to be a link.
! $ret = preg_replace("#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^,\t \n\r]*)?)#i", "\\1<a href=\"http://www.\\2.\\3\\4\" target=\"_blank\">www.\\2.\\3\\4</a>", $ret);
// matches an email@domain type address at the start of a line, or after a space.
--- 615,619 ----
// This is slightly restrictive - it's not going to match stuff like "forums.foo.com"
// This is to keep it from getting annoying and matching stuff that's not meant to be a link.
! $ret = preg_replace("#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^,\t <\n\r]*)?)#i", "\\1<a href=\"http://www.\\2.\\3\\4\" target=\"_blank\">www.\\2.\\3\\4</a>", $ret);
// matches an email@domain type address at the start of a line, or after a space.
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/functions.php,v
retrieving revision 1.133.2.1
retrieving revision 1.133.2.2
diff -C2 -r1.133.2.1 -r1.133.2.2
*** functions.php 15 Apr 2002 14:48:41 -0000 1.133.2.1
--- functions.php 12 May 2002 00:47:40 -0000 1.133.2.2
***************
*** 595,598 ****
--- 595,599 ----
$msg_title = $lang['General_Error'];
}
+ break;
case CRITICAL_ERROR:
Index: page_header.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/page_header.php,v
retrieving revision 1.106.2.2
retrieving revision 1.106.2.3
diff -C2 -r1.106.2.2 -r1.106.2.3
*** page_header.php 11 Apr 2002 17:53:41 -0000 1.106.2.2
--- page_header.php 12 May 2002 00:47:41 -0000 1.106.2.3
***************
*** 36,40 ****
$phpver = phpversion();
! if ( $phpver >= '4.0.4pl1' )
{
if ( extension_loaded('zlib') )
--- 36,40 ----
$phpver = phpversion();
! if ( $phpver >= '4.0.4pl1' && strstr($HTTP_USER_AGENT,'compatible') )
{
if ( extension_loaded('zlib') )
Index: page_tail.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/page_tail.php,v
retrieving revision 1.27
retrieving revision 1.27.2.1
diff -C2 -r1.27 -r1.27.2.1
*** page_tail.php 4 Apr 2002 11:53:13 -0000 1.27
--- page_tail.php 12 May 2002 00:47:41 -0000 1.27.2.1
***************
*** 65,69 ****
$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
! echo '\x1f\x8b\x08\x00\x00\x00\x00\x00';
echo $gzip_contents;
echo pack('V', $gzip_crc);
--- 65,69 ----
$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
! echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
echo $gzip_contents;
echo pack('V', $gzip_crc);
Index: usercp_activate.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/usercp_activate.php,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C2 -r1.6 -r1.6.2.1
*** usercp_activate.php 3 Apr 2002 20:14:47 -0000 1.6
--- usercp_activate.php 12 May 2002 00:47:41 -0000 1.6.2.1
***************
*** 86,90 ****
else
{
! message_die(GENERAL_ERROR, $lang['Wrong_activation']); //wrongactiv
}
}
--- 86,90 ----
else
{
! message_die(GENERAL_MESSAGE, $lang['Wrong_activation']); //wrongactiv
}
}
Index: usercp_avatar.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/usercp_avatar.php,v
retrieving revision 1.8.2.2
retrieving revision 1.8.2.3
diff -C2 -r1.8.2.2 -r1.8.2.3
*** usercp_avatar.php 29 Apr 2002 14:45:07 -0000 1.8.2.2
--- usercp_avatar.php 12 May 2002 00:47:41 -0000 1.8.2.3
***************
*** 185,189 ****
if ( $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] )
{
! $new_filename = ( $current_avatar != '' && $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 = ( ( $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 != '' )
***************
*** 234,238 ****
}
! function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current_email, &$coppa, &$username, &$email, &$icq, &$aim, &$msn, &$yim, &$website, &$location, &$occupation, &$interests, &$signature, &$viewemail, &$notifypm, &$popuppm, &$notifyreply, &$attachsig, &$allowhtml, &$allowbbcode, &$allowsmilies, &$hideonline, &$style, &$language, &$timezone, &$dateformat)
{
global $board_config, $db, $template, $lang, $images, $theme;
--- 234,238 ----
}
! function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current_email, &$coppa, &$username, &$email, &$new_password, &$cur_password, &$password_confirm, &$icq, &$aim, &$msn, &$yim, &$website, &$location, &$occupation, &$interests, &$signature, &$viewemail, &$notifypm, &$popuppm, &$notifyreply, &$attachsig, &$allowhtml, &$allowbbcode, &$allowsmilies, &$hideonline, &$style, &$language, &$timezone, &$dateformat)
{
global $board_config, $db, $template, $lang, $images, $theme;
***************
*** 310,314 ****
}
! $params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'icq', 'aim', 'msn', 'yim', 'website', 'location', 'occupation', 'interests', 'signature', 'viewemail', 'notifypm', 'popuppm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat');
$s_hidden_vars = '<input type="hidden" name="agreed" value="true" />';
--- 310,314 ----
}
! $params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'cur_password', 'new_password', 'password_confirm', 'icq', 'aim', 'msn', 'yim', 'website', 'location', 'occupation', 'interests', 'signature', 'viewemail', 'notifypm', 'popuppm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat');
$s_hidden_vars = '<input type="hidden" name="agreed" value="true" />';
Index: usercp_register.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/usercp_register.php,v
retrieving revision 1.20.2.6
retrieving revision 1.20.2.7
diff -C2 -r1.20.2.6 -r1.20.2.7
*** usercp_register.php 3 May 2002 16:26:52 -0000 1.20.2.6
--- usercp_register.php 12 May 2002 00:47:41 -0000 1.20.2.7
***************
*** 101,105 ****
}
! $trim_var_list = array('password_current' => 'cur_password', 'password' => 'new_password', 'password_confirm' => 'password_confirm', 'signature' => 'signature');
while( list($var, $param) = @each($trim_var_list) )
--- 101,105 ----
}
! $trim_var_list = array('cur_password' => 'cur_password', 'new_password' => 'new_password', 'password_confirm' => 'password_confirm', 'signature' => 'signature');
while( list($var, $param) = @each($trim_var_list) )
***************
*** 179,184 ****
$username = stripslashes($username);
$email = stripslashes($email);
! $password = '';
! $password_confirm = '';
$icq = stripslashes($icq);
--- 179,185 ----
$username = stripslashes($username);
$email = stripslashes($email);
! $cur_password = stripslashes($cur_password);
! $new_password = stripslashes($new_password);
! $password_confirm = stripslashes($password_confirm);
$icq = stripslashes($icq);
***************
*** 222,226 ****
else if ( $mode == 'register' )
{
! if ( empty($username) || empty($password) || empty($password_confirm) || empty($email) )
{
$error = TRUE;
--- 223,227 ----
else if ( $mode == 'register' )
{
! if ( empty($username) || empty($new_password) || empty($password_confirm) || empty($email) )
{
$error = TRUE;
***************
*** 231,242 ****
$passwd_sql = '';
! if ( !empty($password) && !empty($password_confirm) )
{
! if ( $password != $password_confirm )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch'];
}
! else if ( strlen($password) > 32 )
{
$error = TRUE;
--- 232,243 ----
$passwd_sql = '';
! if ( !empty($new_password) && !empty($password_confirm) )
{
! if ( $new_password != $password_confirm )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch'];
}
! else if ( strlen($new_password) > 32 )
{
$error = TRUE;
***************
*** 257,261 ****
$row = $db->sql_fetchrow($result);
! if ( $row['user_password'] != md5($password_current) )
{
$error = TRUE;
--- 258,262 ----
$row = $db->sql_fetchrow($result);
! if ( $row['user_password'] != md5($cur_password) )
{
$error = TRUE;
***************
*** 266,275 ****
if ( !$error )
{
! $password = md5($password);
! $passwd_sql = "user_password = '$password', ";
}
}
}
! else if ( ( empty($password) && !empty($password_confirm) ) || ( !empty($password) && empty($password_confirm) ) )
{
$error = TRUE;
--- 267,276 ----
if ( !$error )
{
! $new_password = md5($new_password);
! $passwd_sql = "user_password = '$new_password', ";
}
}
}
! else if ( ( empty($new_password) && !empty($password_confirm) ) || ( !empty($new_password) && empty($password_confirm) ) )
{
$error = TRUE;
***************
*** 303,307 ****
$row = $db->sql_fetchrow($result);
! if ( $row['user_password'] != md5($password_current) )
{
$email = $userdata['user_email'];
--- 304,308 ----
$row = $db->sql_fetchrow($result);
! if ( $row['user_password'] != md5($cur_password) )
{
$email = $userdata['user_email'];
***************
*** 485,489 ****
//
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
! VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popuppm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";
if ( $board_config['require_activation'] == USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN || $coppa )
{
--- 486,490 ----
//
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
! VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popuppm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";
if ( $board_config['require_activation'] == USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN || $coppa )
{
***************
*** 621,625 ****
$username = stripslashes($username);
$email = stripslashes($email);
! $password = '';
$password_confirm = '';
--- 622,626 ----
$username = stripslashes($username);
$email = stripslashes($email);
! $new_password = '';
$password_confirm = '';
***************
*** 644,648 ****
$username = htmlspecialchars($userdata['username']);
$email = $userdata['user_email'];
! $password = '';
$password_confirm = '';
--- 645,649 ----
$username = htmlspecialchars($userdata['username']);
$email = $userdata['user_email'];
! $new_password = '';
$password_confirm = '';
***************
*** 657,661 ****
$interests = htmlspecialchars($userdata['user_interests']);
$signature_bbcode_uid = $userdata['user_sig_bbcode_uid'];
! $signature = ( $signature_bbcode_uid != '' ) ? preg_replace("/\:(([a-z0-9]:)?)$signature_bbcode_uid/si", '', $userdata['user_sig']) : $userdata['user_sig'];
$viewemail = $userdata['user_viewemail'];
--- 658,662 ----
$interests = htmlspecialchars($userdata['user_interests']);
$signature_bbcode_uid = $userdata['user_sig_bbcode_uid'];
! $signature = ( $signature_bbcode_uid != '' ) ? preg_replace("/:(([a-z0-9]+:)?)$signature_bbcode_uid\]/si", ']', $userdata['user_sig']) : $userdata['user_sig'];
$viewemail = $userdata['user_viewemail'];
***************
*** 706,710 ****
$allowviewonline = !$allowviewonline;
! display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email, $coppa, $username, $email, $icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature, $viewemail, $notifypm, $popuppm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat);
}
else
--- 707,711 ----
$allowviewonline = !$allowviewonline;
! display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email, $coppa, $username, $email, &$new_password, &$cur_password, $password_confirm, $icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature, $viewemail, $notifypm, $popuppm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat);
}
else
***************
*** 722,727 ****
}
- $signature = preg_replace('/\:[0-9a-z\:]*?\]/si', ']', $signature);
-
$avatar_img = '';
if ( $user_avatar_type )
--- 723,726 ----
***************
*** 789,793 ****
$template->assign_vars(array(
! 'USERNAME' => $username,
'EMAIL' => $email,
'YIM' => $yim,
--- 788,795 ----
$template->assign_vars(array(
! 'USERNAME' => $username,
! 'CUR_PASSWORD' => $cur_password,
! 'NEW_PASSWORD' => $new_password,
! 'PASSWORD_CONFIRM' => $password_confirm,
'EMAIL' => $email,
'YIM' => $yim,
|