Forum AideInfo.com Index du Forum

Ajouter cette page sur un site de bookmarks
scoopeo  fuzz  tapemoi  nuouz  bookeet  pioche  Partagez sur del.icio.us  Partagez sur digg.com  Partagez sur furl.net  Partagez sur Yahoo! Mon Web 2.0  Partagez sur StumbleUpon  Partagez sur Google Bookmarks  Partagez sur Technorati  Partagez sur blinklist  Partagez sur Newsvine  Partagez sur ma.gnolia  spurl  simpy

Publicité


Rechercher Liste des Membres Groupes d'utilisateurs Profil Connexion S'enregistrer Messagerie privéeMessagerie privée   Règles du forum Retour au siteRetour au site
  Poster un nouveau sujet Répondre au sujet Forum AideInfo.com Index du Forum » (FIX) Correctifs et mises à jour phpBB   
[MAJ] Mise à jour manuelle 2.0.7 vers 2.0.8
Auteur Message
AideInfo
Administrateur
Expert phpBB


Inscrit le: 11 Juin 2002
Messages: 3913

MessagePosté le: 14 Jan 2005 0:56
MessageSujet du message: [MAJ] Mise à jour manuelle 2.0.7 vers 2.0.8
Répondre en citant

phpBB 2.0.7 to phpBB 2.0.8 Code Changes



These are the Changes from phpBB 2.0.7 to phpBB 2.0.8 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_208.php file (found within every phpBB Package), execute it and then delete it from your webspace.

From phpBB 2.0.7 to 2.0.8 there were no database changes, except the version number increment.

Ok, lets start:


  • admin/admin_forumauth.php



  1. FIND - Line 105
    Code:


             $simple_ary = $simple_auth_ary[$HTTP_POST_VARS['simpleauth']];

             for($i = 0; $i < count($simple_ary); $i++)
             {
                $sql .= ( ( $sql != '' ) ? ', ' : '' ) . $forum_auth_fields[$i] . ' = ' . $simple_ary[$i];
             }

             $sql = "UPDATE " . FORUMS_TABLE . " SET $sql WHERE forum_id = $forum_id";
          }
          else
          {
             for($i = 0; $i < count($forum_auth_fields); $i++)
             {
                $value = $HTTP_POST_VARS[$forum_auth_fields[$i]];


    REPLACE WITH
    Code:


             $simple_ary = $simple_auth_ary[intval($HTTP_POST_VARS['simpleauth'])];

             for($i = 0; $i < count($simple_ary); $i++)
             {
                $sql .= ( ( $sql != '' ) ? ', ' : '' ) . $forum_auth_fields[$i] . ' = ' . $simple_ary[$i];
             }

             if (is_array($simple_ary))
             {
                $sql = "UPDATE " . FORUMS_TABLE . " SET $sql WHERE forum_id = $forum_id";
             }
          }
          else
          {
             for($i = 0; $i < count($forum_auth_fields); $i++)
             {
                $value = intval($HTTP_POST_VARS[$forum_auth_fields[$i]]);



  • admin/admin_forums.php



  1. FIND - Line 60
    Code:


       $mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];


    AFTER, ADD
    Code:


       $mode = htmlspecialchars($mode);



  • admin/admin_groups.php



  1. FIND - Line 54
    Code:


       $mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];


    AFTER, ADD
    Code:


       $mode = htmlspecialchars($mode);



  • admin/admin_ranks.php



  1. FIND - Line 43
    Code:


       $mode = ($HTTP_GET_VARS['mode']) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];


    AFTER, ADD
    Code:


       $mode = htmlspecialchars($mode);



  • admin/admin_smilies.php



  1. FIND - Line 62
    Code:


       $mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];


    AFTER, ADD
    Code:


       $mode = htmlspecialchars($mode);



  2. FIND - Line 319
    Code:


             $smiley_id = ( !empty($HTTP_POST_VARS['id']) ) ? $HTTP_POST_VARS['id'] : $HTTP_GET_VARS['id'];


    AFTER, ADD
    Code:


             $smiley_id = intval($smiley_id);



  3. FIND - Line 340
    Code:


             $smiley_id = ( !empty($HTTP_POST_VARS['id']) ) ? $HTTP_POST_VARS['id'] : $HTTP_GET_VARS['id'];


    AFTER, ADD
    Code:


             $smiley_id = intval($smiley_id);



  • admin/admin_styles.php



  1. FIND - Line 61
    Code:


       $mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];


    AFTER, ADD
    Code:


       $mode = htmlspecialchars($mode);



  2. FIND - Line 492
    Code:


                $style_id = $HTTP_GET_VARS['style_id'];


    REPLACE WITH
    Code:


                $style_id = intval($HTTP_GET_VARS['style_id']);



  3. FIND - Line 707
    Code:


                WHERE template_name = '$template_name'";


    REPLACE WITH
    Code:


                WHERE template_name = '" . str_replace("\'", "''", $template_name) . "'";



  • admin/admin_ug_auth.php



  1. FIND - Line 60
    Code:


    $user_id = intval($user_id);
    $group_id = intval($group_id);


    AFTER, ADD
    Code:


    $adv = intval($adv);
    $mode = htmlspecialchars($mode);



  • admin/admin_user_ban.php



  1. FIND - Line 280
    Code:


                $where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . $user_list[$i];


    REPLACE WITH
    Code:


                $where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . intval($user_list[$i]);



  2. FIND - Line 293
    Code:


                $where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . $ip_list[$i];


    REPLACE WITH
    Code:


                $where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . str_replace("\'", "''", $ip_list[$i]);



  3. FIND - Line 306
    Code:


                $where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . $email_list[$i];


    REPLACE WITH
    Code:


                $where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . str_replace("\'", "''", $email_list[$i]);



  • admin/admin_users.php



  1. FIND - Line 52
    Code:


       $mode = ( isset( $HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];


    AFTER, ADD
    Code:


       $mode = htmlspecialchars($mode);



  2. FIND - Line 842
    Code:


                $category = $HTTP_POST_VARS['avatarcategory'];


    REPLACE WITH
    Code:


                $category = htmlspecialchars($HTTP_POST_VARS['avatarcategory']);



  • admin/admin_words.php



  1. FIND - Line 44
    Code:


       $mode = ($HTTP_GET_VARS['mode']) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];


    AFTER, ADD
    Code:


       $mode = htmlspecialchars($mode);



  2. FIND - Line 67
    Code:


          $word_id = ( isset($HTTP_GET_VARS['id']) ) ? $HTTP_GET_VARS['id'] : 0;


    REPLACE WITH
    Code:


          $word_id = ( isset($HTTP_GET_VARS['id']) ) ? intval($HTTP_GET_VARS['id']) : 0;



  3. FIND - Line 117
    Code:


          $word_id = ( isset($HTTP_POST_VARS['id']) ) ? $HTTP_POST_VARS['id'] : 0;


    REPLACE WITH
    Code:


          $word_id = ( isset($HTTP_POST_VARS['id']) ) ? intval($HTTP_POST_VARS['id']) : 0;



  4. FIND - Line 154
    Code:


          if( isset($HTTP_POST_VARS['id']) ||  isset($HTTP_GET_VARS['id']) )
          {
             $word_id = ( isset($HTTP_POST_VARS['id']) ) ? $HTTP_POST_VARS['id'] : $HTTP_GET_VARS['id'];


    AFTER, ADD
    Code:


             $word_id = intval($word_id);



  • admin/pagestart.php



  1. FIND - Line 59
    Code:


       redirect($url);


    REPLACE WITH
    Code:


       redirect("index.$phpEx?sid=" . $userdata['session_id']);



  • includes/bbcode.php



  1. FIND - Line 284
    Code:


       $text = preg_replace("#\[img\]((ht|f)tp://)([^\r\n\t<\"]*?)\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);


    REPLACE WITH
    Code:


       $text = preg_replace("#\[img\]((ht|f)tp://)([^ \?&=\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);



  • includes/functions_search.php



  1. FIND - Line 201
    Code:


                      $value_sql .= ( ( $value_sql != '' ) ? ', ' : '' ) . '(\'' . $word[$i] . '\', 0)';
                      break;
                   case 'mssql':


    AFTER, ADD
    Code:


                   case 'mssql-odbc':



  2. FIND - Line 226
    Code:


                      VALUES $value_sql";
                   break;
                case 'mssql':


    AFTER, ADD
    Code:


                case 'mssql-odbc':



  • includes/usercp_register.php



  1. FIND - Line 180
    Code:


       $user_avatar_local = ( isset($HTTP_POST_VARS['avatarselect']) && !empty($HTTP_POST_VARS['submitavatar']) && $board_config['allow_avatar_local'] ) ? $HTTP_POST_VARS['avatarselect'] : ( ( isset($HTTP_POST_VARS['avatarlocal'])  ) ? htmlspecialchars($HTTP_POST_VARS['avatarlocal']) : '' );


    REPLACE WITH
    Code:


       $user_avatar_local = ( isset($HTTP_POST_VARS['avatarselect']) && !empty($HTTP_POST_VARS['submitavatar']) && $board_config['allow_avatar_local'] ) ? htmlspecialchars($HTTP_POST_VARS['avatarselect']) : ( ( isset($HTTP_POST_VARS['avatarlocal'])  ) ? htmlspecialchars($HTTP_POST_VARS['avatarlocal']) : '' );



  • login.php



  1. FIND - Line 86
    Code:


                      $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : "index.$phpEx";


    REPLACE WITH
    Code:


                      $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "index.$phpEx";



  2. FIND - Line 96
    Code:


                   $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : '';


    REPLACE WITH
    Code:


                   $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : '';



  3. FIND - Line 111
    Code:


             $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : "";


    REPLACE WITH
    Code:


             $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "";



  4. FIND - Line 133
    Code:


          if (!empty($HTTP_POST_VARS['redirect']) || !empty($HTTP_GET_VARS['redirect']))
          {
             $url = (!empty($HTTP_POST_VARS['redirect'])) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : htmlspecialchars($HTTP_GET_VARS['redirect']);


    AFTER, ADD
    Code:


             $url = str_replace('&', '&', $url);



  5. FIND - Line 143
    Code:


          $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : "index.$phpEx";


    REPLACE WITH
    Code:


          $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "index.$phpEx";



  • privmsg.php



  1. FIND - Line 2079
    Code:



    if ( $row = $db->sql_fetchrow($result) )
    {


    AFTER, ADD
    Code:


       $i = 0;



  2. FIND - Line 2114
    Code:



          $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
          $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];


    AFTER, ADD
    Code:


          $i++;



  • search.php



  1. FIND - Line 72
    Code:


    $search_id = ( isset($HTTP_GET_VARS['search_id']) ) ? $HTTP_GET_VARS['search_id'] : '';

    $show_results = ( isset($HTTP_POST_VARS['show_results']) ) ? $HTTP_POST_VARS['show_results'] : 'posts';


    AFTER, ADD
    Code:


    $show_results = ($show_results == 'topics') ? 'topics' : 'posts';



  2. FIND - Line 148
    Code:


    else if ( $search_keywords != '' || $search_author != '' || $search_id )
    {
       $store_vars = array('search_results', 'total_match_count', 'split_search', 'sort_by', 'sort_dir', 'show_results', 'return_chars');


    AFTER, ADD
    Code:


       $search_results = '';



_________________
Services gratuits

phpBB-Tutoriaux, tous les tutoriaux pour débuter et utiliser phpBB
Voir le profil de l'utilisateur Envoyer un message privé Visiter le site web du posteur  
 
  Poster un nouveau sujet  Répondre au sujet Forum AideInfo.com Index du Forum » (FIX) Correctifs et mises à jour 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
Montrer les messages depuis:   
Page 1 sur 1
 
Sauter vers:  


Powered by phpBB v2 © 2001, 2005 phpBB Group ¦ Theme : Creamy White, modifié par Eric FICHOT pour AideInfo.com