[ReadMe] 3.0.1 => 3.0.2 Code Changes Bug

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning

[ReadMe] 3.0.1 => 3.0.2 Code Changes Bug

Postby Marshalrusty » Fri Jul 11, 2008 6:35 pm

We have recently identified a problem with the 3.0.1 => 3.0.2 code changes package, specifically in the includes/functions_user.php file. Please note that other update packages (patch files, automatic updater, file changes) do NOT appear to be affected.

The code changes have now been repackaged and should be correct. If you downloaded and used the 3.0.1 => 3.0.2 code changes package before the date that this post was made, you will need to make the adjustment below.

We would like to remind you that the code changes should only be used by individuals who are comfortable making direct modifications to code and who are capable of using text diffing programs to double check changes. With long and complex files, such as those found in phpBB3, it is vital to constantly check the line hints (# Around Line 2916) to make sure that you're in the right place. Blocks of code will often appear in the file multiple times. I strongly recommend diffing your manually modified files against vanilla versions to prevent accidental mistakes from being left in the code.

Open includes/functions_user.php

1. Change
    Find:
    Code: Select all
                // Do not allow banning yourself
                if (sizeof($founder))
                {
                    $sql .= ' AND ' . $db->sql_in_set('user_id', array_merge(array_keys($founder), array($user->data['user_id'])), true);
                }
                else
                
    {
                    $sql .= ' AND user_id <> ' . $user->data['user_id'];
                }

                if ($row = $db->sql_fetchrow($result))
                {
                    do
                    
    {
                        $banlist_ary[] = (int) $row['user_id'];
                    }
                    while ($row = $db->sql_fetchrow($result));
                }
                else
                
    {
                    $db->sql_freeresult($result);
                    trigger_error('NO_USERS');
                }
                $db->sql_freeresult($result); 

    Within that block, find:
    Code: Select all
                else
                
    {
                    $sql .= ' AND user_id <> ' . $user->data['user_id'];
                } 

    After, add:
    Code: Select all

                $result 
    = $db->sql_query($sql); 

    You should end up with:
    Code: Select all
                // Do not allow banning yourself
                if (sizeof($founder))
                {
                    $sql .= ' AND ' . $db->sql_in_set('user_id', array_merge(array_keys($founder), array($user->data['user_id'])), true);
                }
                else
                
    {
                    $sql .= ' AND user_id <> ' . $user->data['user_id'];
                }

                $result = $db->sql_query($sql);

                if ($row = $db->sql_fetchrow($result))
                {
                    do
                    
    {
                        $banlist_ary[] = (int) $row['user_id'];
                    }
                    while ($row = $db->sql_fetchrow($result));
                }
                else
                
    {
                    $db->sql_freeresult($result);
                    trigger_error('NO_USERS');
                }
                $db->sql_freeresult($result); 

2. Double Check
If you had any trouble understanding the instructions above, or want to double check your work, here is a vanilla copy of the 3.0.2 includes/functions_user.php: http://temp.marshalrusty.com/functions_user.php.txt

Note: purposely left unlocked for questions and such.
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs
Forumatic - Hassle-free phpBB Forum Hosting
User avatar
Marshalrusty
Project Manager
Project Manager
 
Posts: 28627
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko

Re: [ReadMe] 3.0.1 => 3.0.2 Code Changes Bug

Postby joebart72 » Fri Jul 11, 2008 10:08 pm

Thanks a lot Marshalrusty :D
I learn English with phpbb.com :)
joebart72
Registered User
 
Posts: 743
Joined: Thu Feb 01, 2007 5:54 am
Location: France : Paris (I love U)

Re: [ReadMe] 3.0.1 => 3.0.2 Code Changes Bug

Postby BizimPencere » Fri Jul 11, 2008 10:29 pm

Very thanks for you and angelside. :)
www.phpbbturkiye.net | Turkish phpBB3 support and development
User avatar
BizimPencere
Registered User
 
Posts: 396
Joined: Sat Aug 25, 2007 8:31 pm

Re: [ReadMe] 3.0.1 => 3.0.2 Code Changes Bug

Postby ANgelArvil » Sat Jul 12, 2008 1:50 am

so, modifying my 3.0.1 includes/functions_user.php is enough to update my 3.0.1 to 3.0.2?
ANgelArvil
Registered User
 
Posts: 99
Joined: Tue May 27, 2008 7:04 am

Re: [ReadMe] 3.0.1 => 3.0.2 Code Changes Bug

Postby Noxwizard » Sat Jul 12, 2008 1:56 am

No, this is just a clarification of one of the FINDs in the original 3.0.1 to 3.0.2 Code Changes package.
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Hosting Services - The Business Helpdesk.com, Inc.
Do not contact me for private support, please share the question in our forums.
User avatar
Noxwizard
Support Team Leader
Support Team Leader
 
Posts: 9545
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster

Re: [ReadMe] 3.0.1 => 3.0.2 Code Changes Bug

Postby paisley » Sat Jul 12, 2008 3:58 am

So of I did my update from 3.0.1 to 3.0.2 at 10 pm EST Friday July 11th I am okay?
paisley
Registered User
 
Posts: 3
Joined: Sat Jul 12, 2008 3:50 am

Re: [ReadMe] 3.0.1 => 3.0.2 Code Changes Bug

Postby Marshalrusty » Sat Jul 12, 2008 4:27 am

paisley wrote:So of I did my update from 3.0.1 to 3.0.2 at 10 pm EST Friday July 11th I am okay?

The important question isn't when you did the code changes, but when you initially downloaded the package. The problem was resolved well before 10PM :)

You are, however, welcome to make sure that the missing line is there.
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs
Forumatic - Hassle-free phpBB Forum Hosting
User avatar
Marshalrusty
Project Manager
Project Manager
 
Posts: 28627
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko

Re: [ReadMe] 3.0.1 => 3.0.2 Code Changes Bug

Postby naushadhassam » Sat Jul 12, 2008 11:01 am

hey, Have u got a link for me with the changes to each file? or a download. because i have many modifications which the original file can not be modified and i need to do it manually or some of them dont need no changes.

Do i need to update it to the 3.2? because i am not going to add any mods to my forum or basically i will not be working on it any more.
Free Hosting - Here
Sports Entertainment Online ( A PS3 Online Gaming Community ) - Here
FREE UNLIMITED HOSTING FOR PHPBB MOD MAKERS - PM ME FOR MORE INFO ( MY WAY ON DONATING TO PHPBB )
naushadhassam
Registered User
 
Posts: 506
Joined: Wed Aug 15, 2007 9:57 pm

Re: [ReadMe] 3.0.1 => 3.0.2 Code Changes Bug

Postby Phil » Sat Jul 12, 2008 3:49 pm

That is what the code changes package is. You can obtain it from the downloads page.
Moving on, with the wind. | My Corner of the Web
User avatar
Phil
Former Team Member
 
Posts: 10402
Joined: Sat Nov 25, 2006 4:11 am
Name: Phil Crumm

Re: [ReadMe] 3.0.1 => 3.0.2 Code Changes Bug

Postby naushadhassam » Sat Jul 12, 2008 9:52 pm

its ok :D i have done it and it worked great.
Free Hosting - Here
Sports Entertainment Online ( A PS3 Online Gaming Community ) - Here
FREE UNLIMITED HOSTING FOR PHPBB MOD MAKERS - PM ME FOR MORE INFO ( MY WAY ON DONATING TO PHPBB )
naushadhassam
Registered User
 
Posts: 506
Joined: Wed Aug 15, 2007 9:57 pm

Re: [ReadMe] 3.0.1 => 3.0.2 Code Changes Bug

Postby mara7 » Sat Jul 12, 2008 11:09 pm

also the link to ban user from view profile missed in : styles/subsilver2/template/memberlist_view.html

should add :
<Removed>

I reported here : http://www.phpbb.com/bugs/phpbb3/ticket ... t_id=30485
User avatar
mara7
Registered User
 
Posts: 139
Joined: Wed May 11, 2005 5:59 pm
Location: Saudi Arabia

Re: [ReadMe] 3.0.1 => 3.0.2 Code Changes Bug

Postby Marshalrusty » Sat Jul 12, 2008 11:47 pm

No, that is incorrect. I have removed the code to prevent confusion. There have not been any changes to that file between 3.0.1 and 3.0.2
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs
Forumatic - Hassle-free phpBB Forum Hosting
User avatar
Marshalrusty
Project Manager
Project Manager
 
Posts: 28627
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko

Re: [ReadMe] 3.0.1 => 3.0.2 Code Changes Bug

Postby mara7 » Sun Jul 13, 2008 12:14 am

Marshalrusty wrote:No, that is incorrect. I have removed the code to prevent confusion. There have not been any changes to that file between 3.0.1 and 3.0.2


I know ..

but this code missed .. it is adding [ Banning ] link to user profile in subsilver2 ..
User avatar
mara7
Registered User
 
Posts: 139
Joined: Wed May 11, 2005 5:59 pm
Location: Saudi Arabia

Re: [ReadMe] 3.0.1 => 3.0.2 Code Changes Bug

Postby Phil » Sun Jul 13, 2008 3:30 am

As Henry said in the bug report, the change was not made to subSilver2.
Moving on, with the wind. | My Corner of the Web
User avatar
Phil
Former Team Member
 
Posts: 10402
Joined: Sat Nov 25, 2006 4:11 am
Name: Phil Crumm

Re: [ReadMe] 3.0.1 => 3.0.2 Code Changes Bug

Postby Marshalrusty » Sun Jul 13, 2008 6:51 am

mara7 wrote:I know ..

but this code missed .. it is adding [ Banning ] link to user profile in subsilver2 ..

I understand whatf you're saying, but if it's not in the main package, then it certainly shouldn't in the code changes or automatic package.
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs
Forumatic - Hassle-free phpBB Forum Hosting
User avatar
Marshalrusty
Project Manager
Project Manager
 
Posts: 28627
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko

Next

Return to 3.0.x Support Forum

Who is online

Users browsing this forum: Jessica, Oyabun1, petermfl, Volksdevil, Yahoo [Bot], Yandex [Bot] and 74 guests