PHP Nuke Nederland
 
•   Home  •  Downloads  •  Your Account  •  Forums  •
PHP-Nuke Nederland: Forums

PHP-Nuke Nederland :: View topic - [FIX] Handmatig upgraden van 2.0.18 -> 2.0.19
 Forum FAQ  •   Search   •  Memberlist  •  Usergroups   •  Register   •    •  Profile  •  Log in to check your private messages  •  Log in

 
Post new topicThis topic is locked: you cannot edit posts or make replies.
View previous topic Log in to check your private messages View next topic
Author Message
BlueLion
Administrator
Administrator


Joined: Aug 21, 2004
Posts: 2834

PostPosted: Sat 31 Dec 2005 7:06 Reply with quoteBack to top

phpBB 2.0.18 to phpBB 2.0.19 Code Changes


These are the Changes from phpBB 2.0.18 to phpBB 2.0.19 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.

Database upgrade (via phpMyAdmin):
Code:
INSERT INTO nuke_bbconfig (config_name, config_value) VALUES ('max_login_attempts', '5');
INSERT INTO nuke_bbconfig (config_name, config_value) VALUES ('login_reset_time', '30');
UPDATE nuke_bbconfig SET config_value='.0.19' where config_name='version';


  • modules/Forums/admin/admin_board.php



  1. FIND - Line 19
    Code:


       $module['General']['Configuration'] = "$file?mode=config";


    REPLACE WITH
    Code:


       $module['General']['Configuration'] = $file;



  2. FIND - Line 194
    Code:


       "L_MAX_POLL_OPTIONS" => $lang['Max_poll_options'],
       "L_FLOOD_INTERVAL" => $lang['Flood_Interval'],
       "L_FLOOD_INTERVAL_EXPLAIN" => $lang['Flood_Interval_explain'],


    AFTER, ADD
    Code:



       "L_MAX_LOGIN_ATTEMPTS" => $lang['Max_login_attempts'],
       "L_MAX_LOGIN_ATTEMPTS_EXPLAIN" => $lang['Max_login_attempts_explain'],
       "L_LOGIN_RESET_TIME" => $lang['Login_reset_time'],
       "L_LOGIN_RESET_TIME_EXPLAIN" => $lang['Login_reset_time_explain'],
       "MAX_LOGIN_ATTEMPTS" => $new['max_login_attempts'],
       "LOGIN_RESET_TIME" => $new['login_reset_time'],




  • modules/Forums/admin/admin_db_utilities.php



  1. FIND - Line 696
    Code:


             $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');


    REPLACE WITH
    Code:


             $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', 'sessions_keys');



  • modules/Forums/admin/admin_disallow.php



  1. FIND - Line 28
    Code:


       $module['Users']['Disallow'] = append_sid($filename);


    REPLACE WITH
    Code:


       $module['Users']['Disallow'] = $filename;



  • modules/Forums/admin/admin_ranks.php



  1. FIND - Line 27
    Code:


       $module['Users']['Ranks'] = "$file";


    REPLACE WITH
    Code:


       $module['Users']['Ranks'] = $file;



  • modules/Forums/admin/admin_styles.php



  1. FIND - Line 30
    Code:


       $module['Styles']['Manage'] = "$file";


    REPLACE WITH
    Code:


       $module['Styles']['Manage'] = $file;



  • modules/Forums/admin/admin_users.php



  1. FIND - Line 180
    Code:


                message_die(GENERAL_ERROR, 'Could not delete user from banlist table', '', __LINE__, __FILE__, $sql);
             }



    AFTER, ADD
    Code:


             $sql = "DELETE FROM " . SESSIONS_TABLE . "
                WHERE session_user_id = $user_id";
             if ( !$db->sql_query($sql) )
             {
                message_die(GENERAL_ERROR, 'Could not delete sessions for this user', '', __LINE__, __FILE__, $sql);
             }
             
             $sql = "DELETE FROM " . SESSIONS_KEYS_TABLE . "
                WHERE user_id = $user_id";
             if ( !$db->sql_query($sql) )
             {
                message_die(GENERAL_ERROR, 'Could not delete auto-login keys for this user', '', __LINE__, __FILE__, $sql);
             }




  2. FIND - Line 234
    Code:


          $username = ( !empty($HTTP_POST_VARS['username']) ) ? trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['username']))) : '';


    REPLACE WITH
    Code:


          $username = ( !empty($HTTP_POST_VARS['username']) ) ? phpbb_clean_username($HTTP_POST_VARS['username']) : '';



  3. FIND - Line 407
    Code:


                if( @file_exists(@phpbb_realpath("./" . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar'])) )
                {
                   @unlink("./" . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar']);


    REPLACE WITH
    Code:


                if( @file_exists(@phpbb_realpath('./../' . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar'])) )
                {
                   @unlink('./../' . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar']);



  • modules/Forums/admin/admin_words.php



  1. FIND - Line 28
    Code:


       $module['General']['Word_Censor'] = "$file";


    REPLACE WITH
    Code:


       $module['General']['Word_Censor'] = $file;



  • modules/Forums/admin/index.php



  1. FIND - Line 63
    Code:


             include($file);


    REPLACE WITH
    Code:


             include('./' . $file);



  2. FIND - Line 237
    Code:


             if( preg_match("/^(3\.23|4\.)/", $version) )
             {
                $db_name = ( preg_match("/^(3\.23\.[6-9])|(3\.23\.[1-9][1-9])|(4\.)/", $version) ) ? "`$dbname`" : $dbname;


    REPLACE WITH
    Code:


             if( preg_match("/^(3\.23|4\.|5\.)/", $version) )
             {
                $db_name = ( preg_match("/^(3\.23\.[6-9])|(3\.23\.[1-9][1-9])|(4\.)|(5\.)/", $version) ) ? "`$dbname`" : $dbname;



  • includes/bbcode.php



  1. FIND - Line 203
    Code:


       $patterns[] = "#\[url\]([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is";
       $replacements[] = $bbcode_tpl['url1'];

       // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
       $patterns[] = "#\[url\]((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is";


    REPLACE WITH
    Code:


       $patterns[] = "#\[url\]([\w]+?://([\w\#$%&~/.\-;:=,?@\]+]|\[(?!url=))*?)\[/url\]#is";
       $replacements[] = $bbcode_tpl['url1'];

       // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
       $patterns[] = "#\[url\]((www|ftp)\.([\w\#$%&~/.\-;:=,?@\]+]|\[(?!url=))*?)\[/url\]#is";



  2. FIND - Line 255
    Code:


       $text = bbencode_first_pass_pda($text, $uid, '/\[quote=(\\\".*?\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\1]");


    REPLACE WITH
    Code:


       $text = bbencode_first_pass_pda($text, $uid, '/\[quote=\\\\"(.*?)\\\\"\]/is', '[/quote]', '', false, '', "[quote:$uid=\\\"\\1\\\"]");



  3. FIND - Line 392
    Code:


                if( preg_match('#\[quote=\\\"#si', $possible_start, $match) && !preg_match('#\[quote=\\\"(.*?)\\\"\]#si', $possible_start) )
                {
                   // OK we are in a quote tag that probably contains a ] bracket.
                   // Grab a bit more of the string to hopefully get all of it..
                   if ($close_pos = strpos($text, '"]', $curr_pos + 9))
                   {
                      if (strpos(substr($text, $curr_pos + 9, $close_pos - ($curr_pos + 9)), '[quote') === false)
                      {
                         $possible_start = substr($text, $curr_pos, $close_pos - $curr_pos + 2);


    REPLACE WITH
    Code:


                if( preg_match('#\[quote=\\\"#si', $possible_start, $match) && !preg_match('#\[quote=\\\"(.*?)\\\"\]#si', $possible_start) )
                {
                   // OK we are in a quote tag that probably contains a ] bracket.
                   // Grab a bit more of the string to hopefully get all of it..
                   if ($close_pos = strpos($text, '"]', $curr_pos + 14))
                   {
                      if (strpos(substr($text, $curr_pos + 14, $close_pos - ($curr_pos + 14)), '[quote') === false)
                      {
                         $possible_start = substr($text, $curr_pos, $close_pos - $curr_pos + 7);



  • includes/functions.php



  1. FIND - Line 161
    Code:


       $sql .= ( ( is_integer($user) ) ? "user_id = $user" : "username = '" .  $user . "'" ) . " AND user_id <> " . ANONYMOUS;


    REPLACE WITH
    Code:


       $sql .= ( ( is_integer($user) ) ? "user_id = $user" : "username = '" .  str_replace("\'", "''", $user) . "'" ) . " AND user_id <> " . ANONYMOUS;



  • includes/functions_post.php



  1. FIND - Line 28
    Code:


    $html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#');
    $html_entities_replace = array('&amp;', '&lt;', '&gt;');


    REPLACE WITH
    Code:


    $html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#', '#"#');
    $html_entities_replace = array('&amp;', '&lt;', '&gt;', '&quot;');



  • includes/usercp_confirm.php



  1. FIND - Line 156
    Code:


       if (!empty($HTTP_GET_VARS['c']))
       {
          $_png = define_raw_pngs();

          $char = substr($code, intval($HTTP_GET_VARS['c']) - 1, 1);
          header('Content-Type: image/png');
          header('Cache-control: no-cache, no-store');
          echo base64_decode($_png[$char]);

          unset($_png);
          exit;
       }


    REPLACE WITH
    Code:


       $_png = define_raw_pngs();

       $char = substr($code, -1);
       header('Content-Type: image/png');
       header('Cache-control: no-cache, no-store');
       echo base64_decode($_png[$char]);

       unset($_png);
       exit;



  • includes/usercp_register.php



  1. FIND - Line 110
    Code:


       $strip_var_list = array('username' => 'username', 'email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests');
       $strip_var_list['confirm_code'] = 'confirm_code';


    REPLACE WITH
    Code:


       $strip_var_list = array('email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests', 'confirm_code' => 'confirm_code');



  2. FIND - Line 126
    Code:


       $trim_var_list = array('cur_password' => 'cur_password', 'new_password' => 'new_password', 'password_confirm' => 'password_confirm', 'signature' => 'signature');


    BEFORE, ADD
    Code:


       $username = ( !empty($HTTP_POST_VARS['username']) ) ? phpbb_clean_username($HTTP_POST_VARS['username']) : '';




  3. FIND - Line 301
    Code:


                if ($row['code'] != $confirm_code)


    BEFORE, ADD
    Code:


                // Only compare one char if the zlib-extension is not loaded
                if (!@extension_loaded('zlib'))
                {
                   $row['code'] = substr($row['code'], -1);
                }




  • modules/Forums/language/lang_english/lang_admin.php



  1. FIND - Line 749
    Code:


    //
    // That's all Folks!


    BEFORE, ADD
    Code:


    //
    // Login attempts configuration
    //
    $lang['Max_login_attempts'] = 'Allowed login attempts';
    $lang['Max_login_attempts_explain'] = 'The number of allowed board login attempts.';
    $lang['Login_reset_time'] = 'Login lock time';
    $lang['Login_reset_time_explain'] = 'Time in minutes the user have to wait until he is allowed to login again after exceeding the number of allowed login attempts.';




  • modules/Forums/language/lang_english/lang_main.php



  1. FIND - Line 1021
    Code:


    //
    // That's all, Folks!


    BEFORE, ADD
    Code:


    $lang['Login_attempts_exceeded'] = 'The maximum number of %s login attempts has been exceeded. You are not allowed to login for the next %s minutes.';
    $lang['Please_remove_install_contrib'] = 'Please ensure both the install/ and contrib/ directories are deleted';




  • modules/Forums/login.php



  1. FIND - Line 60
    Code:


          $sql = "SELECT user_id, username, user_password, user_active, user_level


    REPLACE WITH
    Code:


          $sql = "SELECT user_id, username, user_password, user_active, user_level, user_login_tries, user_last_login_try



  2. FIND - Line 79
    Code:


                if( md5($password) == $row['user_password'] && $row['user_active'] )


    BEFORE, ADD
    Code:


                // If the last login is more than x minutes ago, then reset the login tries/time
                if ($row['user_last_login_try'] && $board_config['login_reset_time'] && $row['user_last_login_try'] < (time() - ($board_config['login_reset_time'] * 60)))
                {
                   $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_login_tries = 0, user_last_login_try = 0 WHERE user_id = ' . $row['user_id']);
                   $row['user_last_login_try'] = $row['user_login_tries'] = 0;
                }
                
                // Check to see if user is allowed to login again... if his tries are exceeded
                if ($row['user_last_login_try'] && $board_config['login_reset_time'] && $board_config['max_login_attempts'] &&
                   $row['user_last_login_try'] >= (time() - ($board_config['login_reset_time'] * 60)) && $row['user_login_tries'] >= $board_config['max_login_attempts'])
                {
                   message_die(GENERAL_MESSAGE, sprintf($lang['Login_attempts_exceeded'], $board_config['max_login_attempts'], $board_config['login_reset_time']));
                }




  3. FIND - Line 97
    Code:


                   $admin = (isset($HTTP_POST_VARS['admin'])) ? 1 : 0;
                   $session_id = session_begin($row['user_id'], $user_ip, PAGE_INDEX, FALSE, $autologin, $admin);



    AFTER, ADD
    Code:


                   // Reset login tries
                   $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_login_tries = 0, user_last_login_try = 0 WHERE user_id = ' . $row['user_id']);




  4. FIND - Line 115
    Code:


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


    BEFORE, ADD
    Code:


                   // Save login tries and last login
                   if ($row['user_id'] != ANONYMOUS)
                   {
                      $sql = 'UPDATE ' . USERS_TABLE . '
                         SET user_login_tries = user_login_tries + 1, user_last_login_try = ' . time() . '
                         WHERE user_id = ' . $row['user_id'];
                      $db->sql_query($sql);
                   }
                   



  • modules/Private_Messages/index.php



  1. FIND - Line 38
    Code:


    $html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#');
    $html_entities_replace = array('&amp;', '&lt;', '&gt;');


    REPLACE WITH
    Code:


    $html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#', '#"#');
    $html_entities_replace = array('&amp;', '&lt;', '&gt;', '&quot;');



  • modules/Forums/templates/subSilver/admin/board_config_body.tpl



  1. FIND - Line 59
    Code:


          <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="flood_interval" value="{FLOOD_INTERVAL}" /></td>
       </tr>


    AFTER, ADD
    Code:


       <tr>
          <td class="row1">{L_MAX_LOGIN_ATTEMPTS}<br /><span class="gensmall">{L_MAX_LOGIN_ATTEMPTS_EXPLAIN}</span></td>
          <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="max_login_attempts" value="{MAX_LOGIN_ATTEMPTS}" /></td>
       </tr>
       <tr>
          <td class="row1">{L_LOGIN_RESET_TIME}<br /><span class="gensmall">{L_LOGIN_RESET_TIME_EXPLAIN}</span></td>
          <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="login_reset_time" value="{LOGIN_RESET_TIME}" /></td>
       </tr>



  • modules/Forums/templates/subSilver/admin/index_body.tpl



  1. FIND - Line 46
    Code:


       <td class="row2"><b>{GZIP_COMPRESSION}</b></td>
      </tr>
    </table>


    AFTER, ADD
    Code:



    <h1>{L_VERSION_INFORMATION}</h1>

    {VERSION_INFO}

    <br />




  2. FIND - Line 87
    Code:



    <h1>{L_VERSION_INFORMATION}</h1>

    {VERSION_INFO}

    <br />


    REPLACE WITH (just remove the lines)
    Code:






Last edited by BlueLion on Sun 01 Jan 2006 0:13; edited 2 times in total
View user's profileSend private messageSend e-mailVisit poster's website
BlueLion
Administrator
Administrator


Joined: Aug 21, 2004
Posts: 2834

PostPosted: Sat 31 Dec 2005 7:33 Reply with quoteBack to top

FIX
View user's profileSend private messageSend e-mailVisit poster's website
Display posts from previous:      
 Donaties   Adverteren 
Wilt u het forum steunen, dan kunt u nu eenvoudig doneren met PayPal.
Post new topicThis topic is locked: you cannot edit posts or make replies.
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Web site powered by PHP-Nuke

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2004-2008 by BlueLion.
SEO enhanced with the Sitemapper script
You can syndicate our news using the file backend.php or ultramode.txt
Powered by PHP Powered by MySQL Apache Webserver Valid robots.txt
PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Pagina rendering: 0.18 seconden


[Valid News RSS]

RSS Feeds:
[RSS 2.0 News Feed]
[RSS 2.0 Download Feed]
[RSS 2.0 Forum Feed]
[RSS 2.0 Link Feed]
:: fisubsilver shadow phpbb2 style by Daz :: PHP-Nuke theme by BlueLion ::