voici la mise à jour manuelle de phpBB 2.0.11 -> phpBB 2.0.12
[Ce message est une simple traduction des informations contenues dans ce message de phpBB.com]
Vous trouverez ci-dessous les changements à effectuer pour passer de phpBB 2.0.11 à phpBB 2.0.12, le tout résumé sous la forme d'un MOD. Cela peut vous être utile si vous voulez mettre à jour un forum où des MODs ont été installés. En effet, il est généralement plus simple d'appliquer des modifications directement sur le code source de phpBB que de réinstaller les MODs.
Lorsque vous tombez sur la déclaration 'AJOUTER APRES', le code doit être ajouté après la dernière ligne citée dans la déclaration 'TROUVER'.
Lorsque vous tombez sur la déclaration 'AJOUTER AVANT', le code doit être ajouté avant la première ligne citée dans la déclaration 'TROUVER'.
Lorsque vous tombez sur la déclaration 'REMPLACER PAR', le code cité dans la déclaration 'TROUVER' doit complètement être remplacé par le code cité dans la déclaration 'REMPLACER PAR'.
Lorsque vous tombez sur la déclaration 'SUPPRIMER', le code cité doit être supprimé.
Après avoir effectué les modifications, vous devez envoyer le fichier update_to_latest.php sur votre serveur et l'éxécuter, puis enfin le supprimer.
Instructions pas à pas:
- Créer un répertoire nommé install à la racine de votre installation de phpBB, ex: http://www.votresite.com/phpbb/install/
Attention, la création du répertoire install bloquera temporairement l'accès à votre forum, ne vous affolez pas, il vous suffira de le supprimer pour que tout revienne à la normale- Envoyer update_to_latest.php dans le répertoire install
- Exécuter update_to_latest.php depuis votre navigateur internet en vous rendant simplement à l'url suivante :
http://www.votresite.com/phpbb/install/ ... latest.php- Supprimer le répertoire install et tout ce qu'il contient
Télécharger les fichiers nécessaire à la mise à jour (seul update_to_latest.php devrait vous intéresser).
Instructions pour mise à jour du code :
- admin/admin_db_utilities.php
- TROUVER - Ligne 696
- Code: Tout sélectionner
$tables = array('auth_access', 'banlist', 'categories', 'config', 'disallow', 'forums', 'forum_prune', 'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text', 'ranks', 'search_results', 'search_wordlist', 'search_wordmatch', 'sessions', 'smilies', 'themes', 'themes_name', 'topics', 'topics_watch', 'user_group', 'users', 'vote_desc', 'vote_results', 'vote_voters', 'words');
REMPLACER PAR
- Code: Tout sélectionner
$tables = array('auth_access', 'banlist', 'categories', 'config', 'disallow', 'forums', 'forum_prune', 'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text', 'ranks', 'search_results', 'search_wordlist', 'search_wordmatch', 'sessions', 'smilies', 'themes', 'themes_name', 'topics', 'topics_watch', 'user_group', 'users', 'vote_desc', 'vote_results', 'vote_voters', 'words', 'confirm');
- admin/index.php
- TROUVER - Ligne 562
- Code: Tout sélectionner
"L_NO_GUESTS_BROWSING" => $lang['No_users_browsing'])
);
}
AJOUTER APRES
- Code: Tout sélectionner
// Check for new version
$current_version = explode('.', '2' . $board_config['version']);
$minor_revision = (int) $current_version[2];
$errno = 0;
$errstr = $version_info = '';
if ($fsock = @fsockopen('www.phpbb.com', 80, $errno, $errstr))
{
@fputs($fsock, "GET /updatecheck/20x.txt HTTP/1.1\r\n");
@fputs($fsock, "HOST: www.phpbb.com\r\n");
@fputs($fsock, "Connection: close\r\n\r\n");
$get_info = false;
while (!@feof($fsock))
{
if ($get_info)
{
$version_info .= @fread($fsock, 1024);
}
else
{
if (@fgets($fsock, 1024) == "\r\n")
{
$get_info = true;
}
}
}
@fclose($fsock);
$version_info = explode("\n", $version_info);
$latest_head_revision = (int) $version_info[0];
$latest_minor_revision = (int) $version_info[2];
$latest_version = (int) $version_info[0] . '.' . (int) $version_info[1] . '.' . (int) $version_info[2];
if ($latest_head_revision == 2 && $minor_revision == $latest_minor_revision)
{
$version_info = '<p style="color:green">' . $lang['Version_up_to_date'] . '</p>';
}
else
{
$version_info = '<p style="color:red">' . $lang['Version_not_up_to_date'];
$version_info .= '<br />' . sprintf($lang['Latest_version_info'], $latest_version) . sprintf($lang['Current_version_info'], '2' . $board_config['version']) . '</p>';
}
}
else
{
if ($errstr)
{
$version_info = '<p style="color:red">' . sprintf($lang['Connect_socket_error'], $errstr) . '</p>';
}
else
{
$version_info = '<p>' . $lang['Socket_functions_disabled'] . '</p>';
}
}
$version_info .= '<p>' . $lang['Mailing_list_subscribe_reminder'] . '</p>';
$template->assign_vars(array(
'VERSION_INFO' => $version_info,
'L_VERSION_INFORMATION' => $lang['Version_information'])
);
- common.php
- TROUVER - Ligne 56
- Code: Tout sélectionner
$test = array('HTTP_GET_VARS' => NULL, 'HTTP_POST_VARS' => NULL, 'HTTP_COOKIE_VARS' => NULL, 'HTTP_SERVER_VARS' => NULL, 'HTTP_ENV_VARS' => NULL, 'HTTP_POST_FILES' => NULL);
REMPLACER PAR
- Code: Tout sélectionner
$test = array('HTTP_GET_VARS' => NULL, 'HTTP_POST_VARS' => NULL, 'HTTP_COOKIE_VARS' => NULL, 'HTTP_SERVER_VARS' => NULL, 'HTTP_ENV_VARS' => NULL, 'HTTP_POST_FILES' => NULL, 'phpEx' => NULL, 'phpbb_root_path' => NULL);- TROUVER - Ligne 75
- Code: Tout sélectionner
else if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
{
// PHP4+ path
AJOUTER APRES
- Code: Tout sélectionner
$not_unset = array('HTTP_GET_VARS', 'HTTP_POST_VARS', 'HTTP_COOKIE_VARS', 'HTTP_SERVER_VARS', 'HTTP_SESSION_VARS', 'HTTP_ENV_VARS', 'HTTP_POST_FILES', 'phpEx', 'phpbb_root_path');- TROUVER - Ligne 92
- Code: Tout sélectionner
unset($input['input']);
while (list($var,) = @each($input))
{
unset($$var);
}
REMPLACER PAR
- Code: Tout sélectionner
unset($input['input']);
unset($input['not_unset']);
while (list($var,) = @each($input))
{
if (!in_array($var, $not_unset))
{
unset($$var);
}
}- TROUVER - Ligne 207
- Code: Tout sélectionner
$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR );
REMPLACER PAR
- Code: Tout sélectionner
$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : getenv('REMOTE_ADDR') );
- includes/functions.php
- TROUVER - Ligne 80
- Code: Tout sélectionner
$username = htmlspecialchars(rtrim(trim($username), "\\"));
$username = substr(str_replace("\\'", "'", $username), 0, 25);
$username = str_replace("'", "\\'", $username);
REMPLACER PAR
- Code: Tout sélectionner
$username = substr(htmlspecialchars(str_replace("\'", "'", trim($username))), 0, 25);
$username = phpbb_rtrim($username, "\\");
$username = str_replace("'", "\'", $username);- TROUVER - Ligne 83
- Code: Tout sélectionner
return $username;
}
AJOUTER APRES
- Code: Tout sélectionner
// added at phpBB 2.0.12 to fix a bug in PHP 4.3.10 (only supporting charlist in php >= 4.1.0)
function phpbb_rtrim($str, $charlist = false)
{
if ($charlist === false)
{
return rtrim($str);
}
$php_version = explode('.', PHP_VERSION);
// php version < 4.1.0
if ((int) $php_version[0] < 4 || ((int) $php_version[0] == 4 && (int) $php_version[1] < 1))
{
while ($str{strlen($str)-1} == $charlist)
{
$str = substr($str, 0, strlen($str)-1);
}
}
else
{
$str = rtrim($str, $charlist);
}
return $str;
}- TROUVER - Ligne 608
- Code: Tout sélectionner
$debug_text .= '</br /><br />Line : ' . $err_line . '<br />File : ' . $err_file;
REMPLACER PAR
- Code: Tout sélectionner
$debug_text .= '</br /><br />Line : ' . $err_line . '<br />File : ' . basename($err_file);
- includes/page_tail.php
- TROUVER - Ligne 38
- Code: Tout sélectionner
'PHPBB_VERSION' => '2' . $board_config['version'],
REMPLACER PAR
- Code: Tout sélectionner
// 'PHPBB_VERSION' => '2' . $board_config['version'],
- includes/template.php
- TROUVER - Ligne 233
- Code: Tout sélectionner
$filename = phpbb_realpath($this->root . '/' . $filename);
REMPLACER PAR
- Code: Tout sélectionner
$filename = ($rp_filename = phpbb_realpath($this->root . '/' . $filename)) ? $rp_filename : $filename;
- includes/usercp_avatar.php
- TROUVER - Ligne 54
- Code: Tout sélectionner
{
global $board_config, $userdata;
AJOUTER APRES
- Code: Tout sélectionner
$avatar_file = basename($avatar_file);- TROUVER - Ligne 69
- Code: Tout sélectionner
function user_avatar_gallery($mode, &$error, &$error_msg, $avatar_filename)
{
global $board_config;
AJOUTER APRES
- Code: Tout sélectionner
$avatar_filename = str_replace(array('../', '..\\', './', '.\\'), '', $avatar_filename);
if ($avatar_filename{0} == '/' || $avatar_filename{0} == "\\")
{
return '';
}- TROUVER - Ligne 235
- Code: Tout sélectionner
$move_file = 'copy';
}
AJOUTER APRES
- Code: Tout sélectionner
if (!is_uploaded_file($avatar_filename))
{
message_die(GENERAL_ERROR, 'Unable to upload file', '', __LINE__, __FILE__);
}
- includes/usercp_register.php
- TROUVER - Ligne 462
- Code: Tout sélectionner
$avatar_mode = ( !empty($user_avatar_name) ) ? 'local' : 'remote';
REMPLACER PAR
- Code: Tout sélectionner
$avatar_mode = (empty($user_avatar_name)) ? 'remote' : 'local';
- language/lang_english/lang_admin.php
- TROUVER
- Code: Tout sélectionner
//
// That's all Folks!
// -------------------------------------------------
AJOUTER AVANT
- Code: Tout sélectionner
//
// Version Check
//
$lang['Version_up_to_date'] = 'Your installation is up to date, no updates are available for your version of phpBB.';
$lang['Version_not_up_to_date'] = 'Your installation does <b>not</b> seem to be up to date. Updates are available for your version of phpBB, please visit <a href="http://www.phpbb.com/downloads.php" target="_new">http://www.phpbb.com/downloads.php</a> to obtain the latest version.';
$lang['Latest_version_info'] = 'The latest available version is <b>phpBB %s</b>.';
$lang['Current_version_info'] = 'You are running <b>phpBB %s</b>.';
$lang['Connect_socket_error'] = 'Unable to open connection to phpBB Server, reported error is:<br />%s';
$lang['Socket_functions_disabled'] = 'Unable to use socket functions.';
$lang['Mailing_list_subscribe_reminder'] = 'For the latest information on updates to phpBB, why not <a href="http://www.phpbb.com/support/" target="_new">subscribe to our mailing list</a>.';
$lang['Version_information'] = 'Version Information';
- templates/subSilver/admin/index_body.tpl
- TROUVER - Ligne 80
- Code: Tout sélectionner
</table>
<br />
AJOUTER APRES
- Code: Tout sélectionner
<h1>{L_VERSION_INFORMATION}</h1>
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline">
<tr>
<th align="center">{L_VERSION_INFORMATION}</th>
</tr>
<tr>
<td align="center" class="row1" colspan="2"><span class="gen">{VERSION_INFO}</span></td>
</tr>
</table>
<br />
- templates/subSilver/overall_footer.tpl
- TROUVER - Ligne 8
- Code: Tout sélectionner
Powered by phpBB {PHPBB_VERSION} line, with phpBB linked to www.phpbb.com. If you refuse
to include even this then support on our forums may be affected.
The phpBB Group : 2002
// -->
Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> {PHPBB_VERSION} © 2001, 2002 phpBB Group<br />{TRANSLATION_INFO}</span></div>
REMPLACER PAR
- Code: Tout sélectionner
Powered by phpBB line, with phpBB linked to www.phpbb.com. If you refuse
to include even this then support on our forums may be affected.
The phpBB Group : 2002
// -->
Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> © 2001, 2005 phpBB Group<br />{TRANSLATION_INFO}</span></div>
- templates/subSilver/simple_footer.tpl
- TROUVER - Ligne 8
- Code: Tout sélectionner
Powered by phpBB {PHPBB_VERSION} line, with phpBB linked to www.phpbb.com. If you refuse
to include even this then support on our forums may be affected.
The phpBB Group : 2002
// -->
Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> {PHPBB_VERSION} © 2001,2002 phpBB Group</span></div>
REMPLACER PAR
- Code: Tout sélectionner
Powered by phpBB line, with phpBB linked to www.phpbb.com. If you refuse
to include even this then support on our forums may be affected.
The phpBB Group : 2002
// -->
Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> © 2001, 2005 phpBB Group</span></div>
- viewtopic.php
- TROUVER - Ligne 498
- Code: Tout sélectionner
unset($words);
$highlight = urlencode($HTTP_GET_VARS['highlight']);
AJOUTER APRES
- Code: Tout sélectionner
$highlight_match = phpbb_rtrim($highlight_match, "\\");
Ci-dessous, les traductions supplémentaires en français pour cette nouvelle mouture de phpBB.
- language/lang_french/lang_admin.php
- TROUVER
- Code: Tout sélectionner
//
// That's all Folks!
// -------------------------------------------------
AJOUTER AVANT
- Code: Tout sélectionner
//
// Version Check
//
$lang['Version_up_to_date'] = 'Votre installation est à jour, aucune mise à jour n\'est disponible pour votre version de phpBB.';
$lang['Version_not_up_to_date'] = 'Votre installation de phpBB <b>ne semble pas</b> être à jour. Des mises à jour sont disponibles pour votre version de phpBB, veuillez visiter <a href="http://www.phpbb.com/downloads.php" target="_new">http://www.phpbb.com/downloads.php</a> ou <a href="http://www.phpbb-fr.com/">http://www.phpbb-fr.com/</a> afin d\'obtenir une version plus récente.';
$lang['Latest_version_info'] = 'La dernière version de phpBB disponible est <b>phpBB %s</b>.';
$lang['Current_version_info'] = 'Vous utilisez <b>phpBB %s</b>.';
$lang['Connect_socket_error'] = 'Impossible d\'ouvrir une connexion au serveur phpBB, l\'erreur retournée est :<br />%s.';
$lang['Socket_functions_disabled'] = 'Impossible d\'utiliser les fonctions de socket.';
$lang['Mailing_list_subscribe_reminder'] = 'Afin d\'obtenir les dernières informations sur les mises à jour de phpBB, <a href="http://www.phpbb.com/support/" target="_new">inscrivez-vous à notre liste de diffusion</a> (en anglais).';
$lang['Version_information'] = 'Informations de version';
@+ & bonne mise à jour.

