 |
[MAJ] Mise à jour manuelle 2.0.6 vers 2.0.7 |
  |
 |
| Auteur |
Message |
AideInfo Administrateur Expert phpBB

Inscrit le: 11 Juin 2002 Messages: 3919
|
Posté le: 13 Jan 2005 23:55
Sujet du message: [MAJ] Mise à jour manuelle 2.0.6 vers 2.0.7 |
|
|
phpBB 2.0.6 to phpBB 2.0.7 Code Changes
These are the Changes from phpBB 2.0.6 to phpBB 2.0.7 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.
When you find a 'DELETE'-Statement, the Code have to be deleted.
After you have finished this tutorial, you have to upload the update_to_207.php file, execute it and then delete it from your webspace.
Ok, lets start:
-
FIND - Line 140
| Code: |
if ( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
|
AFTER, ADD
| Code: |
$mode = htmlspecialchars($mode);
|
FIND - Line 594
| Code: |
$sql_in .= ( ( $sql_in != '' ) ? ', ' : '' ) . $members[$i];
|
REPLACE WITH
| Code: |
$sql_in .= ( ( $sql_in != '' ) ? ', ' : '' ) . intval($members[$i]);
|
-
FIND - Line 174
| Code: |
}
while( $row = $db->sql_fetchrow($result) );
}
|
AFTER, ADD
| Code: |
$db->sql_freeresult($result);
|
-
FIND - Line 108
| Code: |
$bbcode_tpl['url4'] = str_replace('{DESCRIPTION}', '\\5', $bbcode_tpl['url4']);
|
REPLACE WITH
| Code: |
$bbcode_tpl['url4'] = str_replace('{DESCRIPTION}', '\\3', $bbcode_tpl['url4']);
|
FIND - Line 201
| Code: |
$patterns[] = "#\[url\]([\w]+?://.*?[^ \"\n\r\t<]*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url1'];
// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
$patterns[] = "#\[url\]((www|ftp)\.([\w\-]+\.)*?[\w\-]+\.[a-z]{2,4}(:?[0-9]*?/[^ \"\n\r\t<]*)?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url2'];
// [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)\.([\w\-]+\.)*?[\w\-]+\.[a-z]{2,4}(:?[0-9]*?/[^ \"\n\r\t<]*)?)\](.*?)\[/url\]#is";
|
REPLACE WITH
| Code: |
$patterns[] = "#\[url\]([\w]+?://[^ \"\n\r\t<]*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url1'];
// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
$patterns[] = "#\[url\]((www|ftp)\.[^ \"\n\r\t<]*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url2'];
// [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";
|
FIND - Line 624
| Code: |
$ret = preg_replace("#(^|[\n ])([\w]+?://.*?[^ \"\n\r\t<]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);
// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
// zzzz is optional.. will contain everything up to the first space, newline,
// comma, double quote or <.
$ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\-]+\.[\w\-.\~]+(?:/[^ \"\t\n\r<]*)?)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);
|
REPLACE WITH
| Code: |
$ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);
// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
// zzzz is optional.. will contain everything up to the first space, newline,
// comma, double quote or <.
$ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);
|
- includes/functions_search.php
-
FIND - Line 243
| Code: |
$sql = "INSERT IGNORE INTO " . SEARCH_MATCH_TABLE . " (post_id, word_id, title_match)
|
REPLACE WITH
| Code: |
$sql = "INSERT INTO " . SEARCH_MATCH_TABLE . " (post_id, word_id, title_match)
|
- includes/topic_review.php
-
FIND - Line 54
| Code: |
{
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}
|
AFTER, ADD
| Code: |
$db->sql_freeresult($result);
|
FIND - Line 211
| Code: |
{
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist', '', __LINE__, __FILE__, $sql);
}
|
AFTER, ADD
| Code: |
$db->sql_freeresult($result);
|
- includes/usercp_register.php
-
FIND - Line 748
| Code: |
$avatar_category = ( !empty($HTTP_POST_VARS['avatarcategory']) ) ? $HTTP_POST_VARS['avatarcategory'] : '';
|
REPLACE WITH
| Code: |
$avatar_category = ( !empty($HTTP_POST_VARS['avatarcategory']) ) ? htmlspecialchars($HTTP_POST_VARS['avatarcategory']) : '';
|
-
FIND - Line 122
| Code: |
}
while( $category_rows[] = $db->sql_fetchrow($result) );
|
AFTER, ADD
| Code: |
$db->sql_freeresult($result);
|
FIND - Line 174
| Code: |
{
$forum_data[] = $row;
}
|
AFTER, ADD
| Code: |
$db->sql_freeresult($result);
|
FIND - Line 202
| Code: |
{
$new_topic_data[$topic_data['forum_id']][$topic_data['topic_id']] = $topic_data['post_time'];
}
|
AFTER, ADD
| Code: |
$db->sql_freeresult($result);
|
FIND - Line 228
| Code: |
{
$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $row['username'] . '</a>';
}
|
AFTER, ADD
| Code: |
$db->sql_freeresult($result);
|
FIND - Line 248
| Code: |
{
$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $row['group_id']) . '">' . $row['group_name'] . '</a>';
}
|
AFTER, ADD
| Code: |
$db->sql_freeresult($result);
|
-
FIND - Line 86
| Code: |
$url = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : "index.$phpEx";
|
REPLACE WITH
| Code: |
$url = ( !empty($HTTP_POST_VARS['redirect']) ) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : "index.$phpEx";
|
FIND - Line 96
| Code: |
$redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : '';
|
REPLACE WITH
| Code: |
$redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : '';
|
FIND - Line 111
| Code: |
$redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : "";
|
REPLACE WITH
| Code: |
$redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : "";
|
FIND - Line 132
| Code: |
$url = (!empty($HTTP_POST_VARS['redirect'])) ? $HTTP_POST_VARS['redirect'] : $HTTP_GET_VARS['redirect'];
|
REPLACE WITH
| Code: |
$url = (!empty($HTTP_POST_VARS['redirect'])) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : htmlspecialchars($HTTP_GET_VARS['redirect']);
|
FIND - Line 142
| Code: |
$url = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : "index.$phpEx";
|
REPLACE WITH
| Code: |
$url = ( !empty($HTTP_POST_VARS['redirect']) ) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : "index.$phpEx";
|
-
FIND - Line 272
| Code: |
$i++;
}
while ( $row = $db->sql_fetchrow($result) );
|
AFTER, ADD
| Code: |
$db->sql_freeresult($result);
|
FIND - Line 292
| Code: |
$pagination = generate_pagination("memberlist.$phpEx?mode=$mode&order=$sort_order", $total_members, $board_config['topics_per_page'], $start). ' ';
}
|
AFTER, ADD
| Code: |
$db->sql_freeresult($result);
|
-
FIND - Line 83
| Code: |
if ( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
|
AFTER, ADD
| Code: |
$mode = htmlspecialchars($mode);
|
-
FIND - Line 38
| Code: |
$$var = ( !empty($HTTP_POST_VARS[$param]) ) ? $HTTP_POST_VARS[$param] : $HTTP_GET_VARS[$param];
|
REPLACE WITH
| Code: |
$$var = ( !empty($HTTP_POST_VARS[$param]) ) ? htmlspecialchars($HTTP_POST_VARS[$param]) : htmlspecialchars($HTTP_GET_VARS[$param]);
|
FIND - Line 224
| Code: |
if ( $result = $db->sql_query($sql) )
{
$post_info = $db->sql_fetchrow($result);
|
AFTER, ADD
| Code: |
$db->sql_freeresult($result);
|
FIND - Line 279
| Code: |
}
while ( $row = $db->sql_fetchrow($result) );
}
|
AFTER, ADD
| Code: |
$db->sql_freeresult($result);
|
FIND - Line 402
| Code: |
}
$notify_user = ( $db->sql_fetchrow($result) ) ? TRUE : $userdata['user_notify'];
|
AFTER, ADD
| Code: |
$db->sql_freeresult($result);
|
FIND - Line 477
| Code: |
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user vote data for this topic', '', __LINE__, __FILE__, $sql);
}
if ( !($row = $db->sql_fetchrow($result)) )
|
REPLACE WITH
| Code: |
if ( !($result2 = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user vote data for this topic', '', __LINE__, __FILE__, $sql);
}
if ( !($row = $db->sql_fetchrow($result2)) )
|
FIND - Line 506
| Code: |
{
$message = $lang['Already_voted'];
}
|
AFTER, ADD
| Code: |
$db->sql_freeresult($result2);
|
FIND - Line 508
| Code: |
else
{
$message = $lang['No_vote_option'];
}
|
AFTER, ADD
| Code: |
$db->sql_freeresult($result);
|
-
FIND - Line 61
| Code: |
if ( isset($HTTP_POST_VARS['folder']) || isset($HTTP_GET_VARS['folder']) )
{
$folder = ( isset($HTTP_POST_VARS['folder']) ) ? $HTTP_POST_VARS['folder'] : $HTTP_GET_VARS['folder'];
|
AFTER, ADD
| Code: |
$folder = htmlspecialchars($folder);
|
DELETE - Line 73
| Code: |
// session id check
if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid']))
{
$sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid'];
}
else
{
$sid = '';
}
|
FIND - Line 96
| Code: |
if ( !empty($HTTP_POST_VARS['mode']) || !empty($HTTP_GET_VARS['mode']) )
{
$mode = ( !empty($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
|
AFTER, ADD
| Code: |
$mode = htmlspecialchars($mode);
|
-
FIND - Line 685
| Code: |
if ( intval($search_id) )
|
REPLACE WITH
| Code: |
$search_id = intval($search_id);
if ( $search_id )
|
- templates/subSilver/index_body.tpl
-
FIND - Line 94
| Code: |
<td width="20" align="center"><img src="templates/subSilver/images/folder_new.gif" alt="{L_NEW_POSTS}"/></td>
<td><span class="gensmall">{L_NEW_POSTS}</span></td>
<td> </td>
<td width="20" align="center"><img src="templates/subSilver/images/folder.gif" alt="{L_NO_NEW_POSTS}" /></td>
<td><span class="gensmall">{L_NO_NEW_POSTS}</span></td>
<td> </td>
<td width="20" align="center"><img src="templates/subSilver/images/folder_lock.gif" alt="{L_FORUM_LOCKED}" /></td>
|
REPLACE WITH
| Code: |
<td width="20" align="center"><img src="templates/subSilver/images/folder_new_big.gif" alt="{L_NEW_POSTS}"/></td>
<td><span class="gensmall">{L_NEW_POSTS}</span></td>
<td> </td>
<td width="20" align="center"><img src="templates/subSilver/images/folder_big.gif" alt="{L_NO_NEW_POSTS}" /></td>
<td><span class="gensmall">{L_NO_NEW_POSTS}</span></td>
<td> </td>
<td width="20" align="center"><img src="templates/subSilver/images/folder_locked_big.gif" alt="{L_FORUM_LOCKED}" /></td>
|
-
FIND - Line 243
| Code: |
$topic_days = ( !empty($HTTP_POST_VARS['topicdays']) ) ? $HTTP_POST_VARS['topicdays'] : $HTTP_GET_VARS['topicdays'];
|
REPLACE WITH
| Code: |
$topic_days = ( !empty($HTTP_POST_VARS['topicdays']) ) ? intval($HTTP_POST_VARS['topicdays']) : intval($HTTP_GET_VARS['topicdays']);
|
-
FIND - Line 317
| Code: |
$post_days = ( !empty($HTTP_POST_VARS['postdays']) ) ? $HTTP_POST_VARS['postdays'] : $HTTP_GET_VARS['postdays'];
|
REPLACE WITH
| Code: |
$post_days = ( !empty($HTTP_POST_VARS['postdays']) ) ? intval($HTTP_POST_VARS['postdays']) : intval($HTTP_GET_VARS['postdays']);
|
FIND - Line 360
| Code: |
$post_order = (!empty($HTTP_POST_VARS['postorder'])) ? $HTTP_POST_VARS['postorder'] : $HTTP_GET_VARS['postorder'];
|
REPLACE WITH
| Code: |
$post_order = (!empty($HTTP_POST_VARS['postorder'])) ? htmlspecialchars($HTTP_POST_VARS['postorder']) : htmlspecialchars($HTTP_GET_VARS['postorder']);
|
_________________ Services gratuits
phpBB-Tutoriaux, tous les tutoriaux pour débuter et utiliser phpBB |
|
|
 |
|
 |
 |
Informations |
 |
| Page 1 sur 1 |
|
| Permissions: |
Vous ne pouvez pas poster de nouveaux sujets dans ce forum Vous ne pouvez pas répondre aux sujets dans ce forum Vous ne pouvez pas éditer vos messages dans ce forum Vous ne pouvez pas supprimer vos messages dans ce forum Vous ne pouvez pas voter dans les sondages de ce forum
|
|
|
|