chatserv
Member Emeritus

Joined: May 02, 2003
Posts: 1389
Location: Puerto Rico
|
Posted:
Thu Jun 02, 2005 4:28 pm |
|
You can always upgrade manually but if for whatever reason you still don't feel like it you should at the very least apply these:
BBtoNuke 2.0.14 to BBtoNuke 2.0.15 Code Changes
These are the Changes from phpBB 2.0.14 to phpBB 2.0.15 summed up into a little Mod. This might be very helpful if you want to update your Board and have installed a bunch of Mods. Then it's normally easier to apply the Code Changes than to install all Mods again.
When you find a 'AFTER, ADD'-Statement, the Code have to be added after the last line quoted in the 'FIND'-Statement.
When you find a 'BEFORE, ADD'-Statement, the Code have to be added before the first line quoted in the 'FIND'-Statement.
When you find a 'REPLACE WITH'-Statement, the Code quoted in the 'FIND'-Statement have to be replaced completely with the quoted Code in the 'REPLACE WITH'-Statement.
- modules/Forums/admin/admin_forums.php
- FIND - Line 236
Code: if( $mode == "addforum" )
{
list($cat_id) = each($HTTP_POST_VARS['addforum']);
|
AFTER, ADD
Code: $cat_id = intval($cat_id);
|
- modules/Forums/admin/admin_smilies.php
- FIND - Line 450
Code: $smile_code = ( isset($HTTP_POST_VARS['smile_code']) ) ? $HTTP_POST_VARS['smile_code'] : $HTTP_GET_VARS['smile_code'];
$smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? $HTTP_POST_VARS['smile_url'] : $HTTP_GET_VARS['smile_url'];
$smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? $HTTP_POST_VARS['smile_emotion'] : $HTTP_GET_VARS['smile_emotion'];
|
AFTER, ADD
Code: $smile_code = trim($smile_code);
$smile_url = trim($smile_url);
$smile_emotion = trim($smile_emotion);
|
- FIND - Line 126
Code: $query = preg_replace('#(.*WHERE.*)(username|user_email|ban_email) = \'(.*)\'#ise', "\"\\1LOWER(\\2) = '\" . strtolower('\\3') . \"'\"", $query);
|
REPLACE WITH
Code:// $query = preg_replace('#(.*WHERE.*)(username|user_email|ban_email) = \'(.*)\'#ise', "\"\\1LOWER(\\2) = '\" . strtolower('\\3') . \"'\"", $query);
|
- modules/Forums/groupcp.php
- FIND - Line 340
Code: if ( !($row = $db->sql_fetchrow($result)) )
|
REPLACE WITH
Code: if ( !($row = $db->sql_fetchrow($result)) || $row['is_auth_mod'] == 0 )
|
- FIND - Line 127
Code:{
global $lang, $bbcode_tpl;
|
AFTER, ADD
Code: $text = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1:", $text);
|
-
FIND - Line 197
Code: // [img]image_url_here[/img] code..
// This one gets first-passed..
$patterns[] = "#\[img:$uid\](.*?)\[/img:$uid\]#si";
|
REPLACE WITH
Code: // [img]image_url_here[/img] code..
// This one gets first-passed..
$patterns[] = "#\[img:$uid\]([^?].*?)\[/img:$uid\]#i";
|
-
FIND - Line 210
Code: // [url=xxxx://www.phpbb.com]phpBB[/url] code..
$patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\](.*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url3'];
// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
$patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\](.*?)\[/url\]#is";
|
REPLACE WITH
Code: // [url=xxxx://www.phpbb.com]phpBB[/url] code..
$patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\]([^?].*?)\[/url\]#i";
$replacements[] = $bbcode_tpl['url3'];
// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
$patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?].*?)\[/url\]#i";
|
-
FIND - Line 619
Code: */
function make_clickable($text)
{
|
AFTER, ADD
Code: $text = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1:", $text);
|
- FIND - Line 109
Code: if( !$socket = fsockopen($board_config['smtp_host'], 25, $errno, $errstr, 20) )
|
REPLACE WITH
Code: if( !$socket = @fsockopen($board_config['smtp_host'], 25, $errno, $errstr, 20) )
|
- includes/usercp_viewprofile.php
- FIND - Line 36
Code:}
$profiledata = get_userdata($HTTP_GET_VARS[POST_USERS_URL]);
|
AFTER, ADD
Code:if (!$profiledata)
{
message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);
}
|
- modules/Forums/viewtopic.php
- FIND - Line 1110
Code: $message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace('#\b(" . $highlight_match . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $message . '<'), 1, -1));
|
REPLACE WITH
Code: $message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace('#\b(" . str_replace('\\', '\\\\', $highlight_match) . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $message . '<'), 1, -1));
|
- modules/Forums/admin/admin_ug_auth.php
- FIND - Line 553
Code: message_die(GENERAL_MESSAGE, $message);
}
}
else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id ) ) || ( $mode == 'group' && $group_id ) )
|
BEFORE, ADD
Code: $sql = 'SELECT user_id FROM ' . USER_GROUP_TABLE . "
WHERE group_id = $group_id";
$result = $db->sql_query($sql);
$group_user = array();
while ($row = $db->sql_fetchrow($result))
{
$group_user[$row['user_id']] = $row['user_id'];
}
$db->sql_freeresult($result);
$sql = "SELECT ug.user_id, COUNT(auth_mod) AS is_auth_mod
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug
WHERE ug.user_id IN (" . implode(', ', $group_user) . ")
AND aa.group_id = ug.group_id
AND aa.auth_mod = 1
GROUP BY ug.user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain moderator status', '', __LINE__, __FILE__, $sql);
}
while ($row = $db->sql_fetchrow($result))
{
if ($row['is_auth_mod'])
{
unset($group_user[$row['user_id']]);
}
}
$db->sql_freeresult($result);
if (sizeof($group_user))
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . USER . "
WHERE user_id IN (" . implode(', ', $group_user) . ")";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update user level', '', __LINE__, __FILE__, $sql);
}
}
|
- includes/usercp_register.php
- FIND - Line 414
Code: if (strtolower($username) != strtolower($userdata['username']))
|
REPLACE WITH
Code: if (strtolower($username) != strtolower($userdata['username']) || $mode == 'register')
|
|
|
|