phpBBHacks.com - phpBB 2.0.3 to 2.0.4 Code Changes - Page 2
Rate your favorite (and least favorite) sodas at SodaRatings.com
StatsForums Home   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in
FAQFAQ   SearchSearch   MemberlistMemberlist   TutorialsTutorials   ContactContact Us
Add Us:     MySpace     Facebook     StumbleUpon
Username:    Password:
Remember Me?    
phpBB 2.0.3 to 2.0.4 Code Changes
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
BlinkList
del.icio.us
Furl
linkaGoGo
reddit
Simpy
Mister Wong
Yahoo! My Web

Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2: Fixes and Code Changes
 See a User Guidelines violation? Please contact us.
Author Message

Acyd Burn
Consultant

Joined: 19 Apr 2002
Posts: 650
Location: Germany (Oldb)

PostPosted: January 26th 2003, 5:25 pm    Post subject: Reply with quote

  • admin/index.php



  1. FIND - Line 457
    Code:


                   "U_WHOIS_IP" => "http://www.samspade.org/t/ipwhois?a=$reg_ip",


    REPLACE WITH
    Code:


                   "U_WHOIS_IP" => "http://www.geektools.com/cgi-bin/proxy.cgi?query=$reg_ip&targetnic=auto",



  2. FIND - Line 549
    Code:


                "U_WHOIS_IP" => "http://www.samspade.org/t/ipwhois?a=$guest_ip",


    REPLACE WITH
    Code:


                "U_WHOIS_IP" => "http://www.geektools.com/cgi-bin/proxy.cgi?query=$guest_ip&targetnic=auto",




Last edited by Acyd Burn on January 27th 2003, 5:37 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website

Acyd Burn
Consultant

Joined: 19 Apr 2002
Posts: 650
Location: Germany (Oldb)

PostPosted: January 26th 2003, 5:26 pm    Post subject: Reply with quote

  • admin/page_header_admin.php



  1. FIND - Line 38
    Code:


       if ( $phpver >= '4.0.4pl1' && strstr($HTTP_USER_AGENT,'compatible') )


    REPLACE WITH
    Code:


       $useragent = (isset($_SERVER["HTTP_USER_AGENT"]) ) ? $_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT;

       if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )


Back to top
View user's profile Send private message Visit poster's website

Acyd Burn
Consultant

Joined: 19 Apr 2002
Posts: 650
Location: Germany (Oldb)

PostPosted: January 26th 2003, 5:27 pm    Post subject: Reply with quote

  • admin/pagestart.php



  1. FIND - Line 40
    Code:


    if( !$userdata['session_logged_in'] )
    {
       $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
       header($header_location . '../' . append_sid("login.$phpEx?redirect=admin/"));
       exit;
    }
    else if( $userdata['user_level'] != ADMIN )
    {
       message_die(GENERAL_MESSAGE, $lang['Not_admin']);
    }

    if ( empty($no_page_header) )


    REPLACE WITH
    Code:



    if (!$userdata['session_logged_in'])
    {
       redirect(append_sid("login.$phpEx?redirect=admin/", true));
    }
    else if ($userdata['user_level'] != ADMIN)
    {
       message_die(GENERAL_MESSAGE, $lang['Not_admin']);
    }

    if ($HTTP_GET_VARS['sid'] != $userdata['session_id'])
    {
       $url = preg_replace('/sid=([^&]*)(&?)/i', '', $HTTP_SERVER_VARS['REQUEST_URI']);
       $url = preg_replace('/\?$/', '', $url);
       $url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $userdata['session_id'];

       redirect($url);
    }

    if (empty($no_page_header))


Back to top
View user's profile Send private message Visit poster's website

Acyd Burn
Consultant

Joined: 19 Apr 2002
Posts: 650
Location: Germany (Oldb)

PostPosted: January 26th 2003, 5:28 pm    Post subject: Reply with quote

  • common.php



  1. FIND - Line 115
    Code:


       header("Location: install.$phpEx");


    REPLACE WITH
    Code:


       header("Location: install/install.$phpEx");



  2. FIND - Line 157
    Code:


          $private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.16\..*/', '/^10..*/', '/^224..*/', '/^240..*/');


    REPLACE WITH
    Code:


          $private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.16\..*/', '/^10.\.*/', '/^224.\.*/', '/^240.\.*/');



  3. FIND - Line 184
    Code:


       $board_config[$row['config_name']] = $row['config_value'];
    }



    AFTER, ADD
    Code:


    if (file_exists('install') || file_exists('contrib'))
    {
       message_die(GENERAL_MESSAGE, 'Please ensure both the install/ and contrib/ directories are deleted');
    }



Back to top
View user's profile Send private message Visit poster's website

Acyd Burn
Consultant

Joined: 19 Apr 2002
Posts: 650
Location: Germany (Oldb)

PostPosted: January 26th 2003, 5:30 pm    Post subject: Reply with quote

--- if you are not using mssql, you can skip this file ---

  • db/mssql.php



  1. FIND - Line 54
    Code:


          $this->db_connect_id = ( $this->persistency ) ? mssql_pconnect($this->server, $this->user, $this->password) : mssql_connect($this->server, $this->user, $this->password);


    REPLACE WITH
    Code:


          $this->db_connect_id = ( $this->persistency ) ? @mssql_pconnect($this->server, $this->user, $this->password) : @mssql_connect($this->server, $this->user, $this->password);



  2. FIND - Line 95
    Code:


       function sql_query($query = "", $transaction = FALSE)


    REPLACE WITH
    Code:


       function sql_query($query = '', $transaction = FALSE)



  3. FIND - Line 103
    Code:


          if ( $query != "" )
          {
             $this->num_queries++;

             if ( $transaction == BEGIN_TRANSACTION && !$this->in_transaction )
             {
                if ( !mssql_query("BEGIN TRANSACTION", $this->db_connect_id) )


    REPLACE WITH
    Code:


          if ( $query != '' )
          {
             $this->num_queries++;

             if ( $transaction == BEGIN_TRANSACTION && !$this->in_transaction )
             {
                if ( !@mssql_query('BEGIN TRANSACTION', $this->db_connect_id) )



  4. FIND - Line 128
    Code:


             if( preg_match("/^SELECT(.*?)(LIMIT ([0-9]+)[, ]*([0-9]+)*)?$/s", $query, $limits) )


    REPLACE WITH
    Code:


             if( preg_match('#^SELECT(.*?)(LIMIT ([0-9]+)[, ]*([0-9]+)*)?$#s', $query, $limits) )



  5. FIND - Line 137
    Code:


                   $query = "TOP " . ( $row_offset + $num_rows ) . $query;
                }

                $this->result = mssql_query("SELECT $query", $this->db_connect_id);


    REPLACE WITH
    Code:


                   $query = 'TOP ' . ( $row_offset + $num_rows ) . $query;
                }

                $this->result = @mssql_query("SELECT $query", $this->db_connect_id);



  6. FIND - Line 148
    Code:


                      mssql_data_seek($this->result, $row_offset);
                   }
                }
             }
             else if( eregi("^INSERT ", $query) )
             {
                if( mssql_query($query, $this->db_connect_id) )
                {
                   $this->result = time() + microtime();

                   $result_id = mssql_query("SELECT @@IDENTITY AS id, @@ROWCOUNT as affected", $this->db_connect_id);
                   if( $result_id )
                   {
                      if( $row = mssql_fetch_array($result_id) )


    REPLACE WITH
    Code:


                      @mssql_data_seek($this->result, $row_offset);
                   }
                }
             }
             else if( preg_match('#^INSERT #i', $query) )
             {
                if( @mssql_query($query, $this->db_connect_id) )
                {
                   $this->result = time() + microtime();

                   $result_id = @mssql_query('SELECT @@IDENTITY AS id, @@ROWCOUNT as affected', $this->db_connect_id);
                   if( $result_id )
                   {
                      if( $row = @mssql_fetch_array($result_id) )



  7. FIND - Line 171
    Code:


                if( mssql_query($query, $this->db_connect_id) )
                {
                   $this->result = time() + microtime();

                   $result_id = mssql_query("SELECT @@ROWCOUNT as affected", $this->db_connect_id);
                   if( $result_id )
                   {
                      if( $row = mssql_fetch_array($result_id) )


    REPLACE WITH
    Code:


                if( @mssql_query($query, $this->db_connect_id) )
                {
                   $this->result = time() + microtime();

                   $result_id = @mssql_query('SELECT @@ROWCOUNT as affected', $this->db_connect_id);
                   if( $result_id )
                   {
                      if( $row = @mssql_fetch_array($result_id) )



  8. FIND - Line 190
    Code:


                   mssql_query("ROLLBACK", $this->db_connect_id);


    REPLACE WITH
    Code:


                   @mssql_query('ROLLBACK', $this->db_connect_id);



  9. FIND - Line 201
    Code:


                if( !@mssql_query("COMMIT", $this->db_connect_id) )


    REPLACE WITH
    Code:


                if( !@mssql_query('COMMIT', $this->db_connect_id) )



  10. FIND - Line 216
    Code:


                if( !@mssql_query("COMMIT", $this->db_connect_id) )
                {
                   @mssql_query("ROLLBACK", $this->db_connect_id);


    REPLACE WITH
    Code:


                if( !@mssql_query('COMMIT', $this->db_connect_id) )
                {
                   @mssql_query('ROLLBACK', $this->db_connect_id);



  11. FIND - Line 239
    Code:


             return ( !empty($this->limit_offset[$query_id]) ) ? mssql_num_rows($query_id) - $this->limit_offset[$query_id] : @mssql_num_rows($query_id);


    REPLACE WITH
    Code:


             return ( !empty($this->limit_offset[$query_id]) ) ? @mssql_num_rows($query_id) - $this->limit_offset[$query_id] : @mssql_num_rows($query_id);



  12. FIND - Line 254
    Code:


          return ( $query_id ) ? mssql_num_fields($query_id) : false;


    REPLACE WITH
    Code:


          return ( $query_id ) ? @mssql_num_fields($query_id) : false;



  13. FIND - Line 264
    Code:


          return ( $query_id ) ? mssql_field_name($query_id, $offset) : false;


    REPLACE WITH
    Code:


          return ( $query_id ) ? @mssql_field_name($query_id, $offset) : false;



  14. FIND - Line 274
    Code:


          return ( $query_id ) ? mssql_field_type($query_id, $offset) : false;


    REPLACE WITH
    Code:


          return ( $query_id ) ? @mssql_field_type($query_id, $offset) : false;



  15. FIND - Line 288
    Code:


             $row = mssql_fetch_array($query_id);


    REPLACE WITH
    Code:


             $row = @mssql_fetch_array($query_id);



  16. FIND - Line 316
    Code:


             while( $row = mssql_fetch_array($query_id))


    REPLACE WITH
    Code:


             while( $row = @mssql_fetch_array($query_id))



  17. FIND - Line 347
    Code:


                   $result = ( !empty($this->limit_offset[$query_id]) ) ? mssql_result($this->result, ($this->limit_offset[$query_id] + $row), $field) : false;
                }
                else
                {
                   $result = mssql_result($this->result, $row, $field);
                }
             }
             else
             {
                if( empty($this->row[$query_id]) )
                {
                   $this->row[$query_id] = mssql_fetch_array($query_id);


    REPLACE WITH
    Code:


                   $result = ( !empty($this->limit_offset[$query_id]) ) ? @mssql_result($this->result, ($this->limit_offset[$query_id] + $row), $field) : false;
                }
                else
                {
                   $result = @mssql_result($this->result, $row, $field);
                }
             }
             else
             {
                if( empty($this->row[$query_id]) )
                {
                   $this->row[$query_id] = @mssql_fetch_array($query_id);



  18. FIND - Line 380
    Code:


             return ( !empty($this->limit_offset[$query_id]) ) ? mssql_data_seek($query_id, ($this->limit_offset[$query_id] + $rownum)) : mssql_data_seek($query_id, $rownum);


    REPLACE WITH
    Code:


             return ( !empty($this->limit_offset[$query_id]) ) ? @mssql_data_seek($query_id, ($this->limit_offset[$query_id] + $rownum)) : @mssql_data_seek($query_id, $rownum);



  19. FIND - Line 405
    Code:


          return ( $query_id ) ? mssql_free_result($query_id) : false;


    REPLACE WITH
    Code:


          return ( $query_id ) ? @mssql_free_result($query_id) : false;


Back to top
View user's profile Send private message Visit poster's website

Acyd Burn
Consultant

Joined: 19 Apr 2002
Posts: 650
Location: Germany (Oldb)

PostPosted: January 26th 2003, 5:33 pm    Post subject: Reply with quote

--- if you are not using oracle, you can skip this file ---

  • db/oracle.php



  1. FIND - Line 299
    Code:


             for($i = 0; $i <= $rows; $i++)


    REPLACE WITH
    Code:


             for($i = 0; $i < $rows; $i++)


Back to top
View user's profile Send private message Visit poster's website

Acyd Burn
Consultant

Joined: 19 Apr 2002
Posts: 650
Location: Germany (Oldb)

PostPosted: January 26th 2003, 5:34 pm    Post subject: Reply with quote

  • groupcp.php



  1. FIND - Line 130
    Code:


       $group_id = ( isset($HTTP_GET_VARS[POST_GROUPS_URL]) ) ? intval($HTTP_GET_VARS[POST_GROUPS_URL]) : intval($HTTP_POST_VARS[POST_GROUPS_URL]);


    REPLACE WITH
    Code:


       $group_id = ( isset($HTTP_POST_VARS[POST_GROUPS_URL]) ) ? intval($HTTP_POST_VARS[POST_GROUPS_URL]) : intval($HTTP_GET_VARS[POST_GROUPS_URL]);



  2. FIND - Line 154
    Code:


    $header_location = ( @preg_match('/Microsoft|WebSTAR/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
    $is_moderator = FALSE;

    if ( isset($HTTP_POST_VARS['groupstatus']) && $group_id )
    {
       if ( !$userdata['session_logged_in'] )
       {
          header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
          exit;


    REPLACE WITH
    Code:


    $is_moderator = FALSE;

    if ( isset($HTTP_POST_VARS['groupstatus']) && $group_id )
    {
       if ( !$userdata['session_logged_in'] )
       {
          redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
       }

       if (!isset($HTTP_POST_VARS['sid']) || $HTTP_POST_VARS['sid'] != $userdata['session_id'])
       {
          message_die(GENERAL_ERROR, 'Invalid_session');



  3. FIND - Line 214
    Code:


          header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
          exit;


    REPLACE WITH
    Code:


          redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
       }

       if (!isset($HTTP_POST_VARS['sid']) || $HTTP_POST_VARS['sid'] != $userdata['session_id'])
       {
          message_die(GENERAL_ERROR, 'Invalid_session');



  4. FIND - Line 291
    Code:


       $emailer->set_subject();//$lang['Group_request']
       $emailer->extra_headers($email_headers);

       $emailer->assign_vars(array(
          'SITENAME' => $board_config['sitename'],
          'GROUP_MODERATOR' => $moderator['username'],
          'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),


    REPLACE WITH
    Code:


       $emailer->set_subject($lang['Group_request']);
       $emailer->extra_headers($email_headers);

       $emailer->assign_vars(array(
          'SITENAME' => $board_config['sitename'],
          'GROUP_MODERATOR' => $moderator['username'],
          'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '',



  5. FIND - Line 320
    Code:


          header($header_location . append_sid("groupcp.$phpEx", true));
          exit;
       }
       elseif ( !$userdata['session_logged_in'] )
       {
          header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
          exit;


    REPLACE WITH
    Code:


          redirect(append_sid("groupcp.$phpEx", true));
       }
       elseif ( !$userdata['session_logged_in'] )
       {
          redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
       }

       if (!isset($HTTP_POST_VARS['sid']) || $HTTP_POST_VARS['sid'] != $userdata['session_id'])
       {
          message_die(GENERAL_ERROR, 'Invalid_session');



  6. FIND - Line 378
    Code:


          $s_hidden_fields = '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" /><input type="hidden" name="unsub" value="1" />';


    REPLACE WITH
    Code:


          $s_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" /><input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" /><input type="hidden" name="unsub" value="1" />';



  7. FIND - Line 412
    Code:


             header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
             exit;


    REPLACE WITH
    Code:


             redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));



  8. FIND - Line 473
    Code:


                header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
                exit;


    REPLACE WITH
    Code:


                redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
             }

             if (!isset($HTTP_POST_VARS['sid']) || $HTTP_POST_VARS['sid'] != $userdata['session_id'])
             {
                message_die(GENERAL_ERROR, 'Invalid_session');



  9. FIND - Line 579
    Code:


                   $emailer->set_subject();//$lang['Group_added']
                   $emailer->extra_headers($email_headers);

                   $emailer->assign_vars(array(
                      'SITENAME' => $board_config['sitename'],
                      'GROUP_NAME' => $group_name,
                      'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),


    REPLACE WITH
    Code:


                   $emailer->set_subject($lang['Group_added']);
                   $emailer->extra_headers($email_headers);

                   $emailer->assign_vars(array(
                      'SITENAME' => $board_config['sitename'],
                      'GROUP_NAME' => $group_name,
                      'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '',



  10. FIND - Line 733
    Code: