[Tool] phpBB 2.0.11 to phpBB 2.0.12 Code Changes

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
77
71%
Very Good
13
12%
Good
7
6%
Fair
4
4%
Poor
8
7%
 
Total votes: 109

PCTalk
Registered User
Posts: 259
Joined: Mon Jul 29, 2002 5:17 pm
Location: MD, USA
Contact:

Post by PCTalk » Sun Mar 06, 2005 5:02 pm

I found many references to this problem early in this discussion but non of them seem to apply to me, so will ask my question with as much precision as possible.

In the change file, right at the beginning is the code for changing admin/admin_db_utilities.php.

It says to find (on line 696) something that starts with "$tables = array('auth_access',"

I have compared my admin_db_utilities.php file and an unmodified version of the same file. The unmodified version looks as follows:

Code: Select all

				include('./page_footer_admin.'.$phpEx);
			}

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

			$additional_tables = (isset($HTTP_POST_VARS['additional_tables'])) ? $HTTP_POST_VARS['additional_tables'] : ( (isset($HTTP_GET_VARS['additional_tables'])) ? $HTTP_GET_VARS['additional_tables'] : "" );
My modified version, however, looks like:

Code: Select all

				include('./page_footer_admin.'.$phpEx);
			}

			$phpbb_only = (!empty($HTTP_POST_VARS['phpbb_only'])) ? $HTTP_POST_VARS['phpbb_only'] : ( (!empty($HTTP_GET_VARS['phpbb_only'])) ? $HTTP_GET_VARS['phpbb_only'] : 0 );
			switch ( SQL_LAYER )
			{
				case 'mysql':
				case 'mysql4':
					$sql = 'SHOW TABLES';
					$field = "Tables_in_{$dbname}";
					break;
				case 'postgresql':
					$sql = "SELECT relname
						FROM pg_class
						WHERE relkind = 'r'
						AND relname NOT LIKE 'pg\_%'";
					$field = "relname";
					break;
			}
			$result = $db->sql_query($sql);
			while ($row = $db->sql_fetchrow($result))
			{
				$current_table = $row[$field];
				$current_prefix = substr($current_table, 0, strlen($table_prefix));
				if ($phpbb_only && $current_prefix != $table_prefix)
				{
					continue;
				}
				else
				{
					$tables[] = $current_table;
				}
			}

			$additional_tables = (isset($HTTP_POST_VARS['additional_tables'])) ? $HTTP_POST_VARS['additional_tables'] : ( (isset($HTTP_GET_VARS['additional_tables'])) ? $HTTP_GET_VARS['additional_tables'] : "" );
Nowhere in the entire file can I find even the string "auth_access", much less the rest of the change to add ", 'confirm'" to the end. It appears my version is reading information dynamically.

Anyone have any suggestions? I know 2.0.13 is out already. I want to update to 2.0.12 first ... :?

[Added]
I have gone through the entire update process and the above problem is the only one I had. I have not uploaded the changed files however, as I would like a definitive answer to my question first.
Visit PCTalk.info to see my teaching website.
Wildtangent has closed their forum. See my member created substitute at Wildtangent Fansite.
Support Request Template - Knowledge Base

Fabikus
Registered User
Posts: 43
Joined: Mon Mar 07, 2005 12:24 am

Post by Fabikus » Mon Mar 07, 2005 12:27 am

I have a problem... i don't know if the problem was update of my board to latest version but now when i try to search an username in my ADMIN panel (also in permission panel) it gives me a blank page without displaying me detalis of user. But if i try to click to an username nickname (where you see who is on line) in my Admin index page it works correctly... why???

davenewt
Registered User
Posts: 4
Joined: Tue Apr 27, 2004 3:31 pm

Re: [Tool] phpBB 2.0.11 to phpBB 2.0.12 Code Changes

Post by davenewt » Mon Mar 07, 2005 9:34 am

MOD Database Manager wrote: MOD Name: phpBB 2.0.11 to phpBB 2.0.12 Code Changes
...
Download File: phpbb_2011_to_2012.zip


When I download this, all the files are named 2.0.10_to_2.0.11 - not 2.0.11_to_2.0.12...

//edit - scrap that... I was automatically unzipping the old download file which was still sitting in my downloads directory, instead of looking properly for the new zip. Apologies :)

Thanks,
Dave.

BlueRook
Registered User
Posts: 2892
Joined: Wed Mar 10, 2004 2:38 am

Post by BlueRook » Tue Mar 08, 2005 2:19 am

PCTalk, do you have and MODs that affect your database backup functions? Such as the Complete Database Backup MOD? If so then that is most likely the cause of your difference.

BlueRook
Registered User
Posts: 2892
Joined: Wed Mar 10, 2004 2:38 am

Post by BlueRook » Tue Mar 08, 2005 2:23 am

ilmorris, it still looks like you might have missed something or edited too much.

Code: Select all

t] . '_i]'; } return $varref; } } ?>
That really looks like you are missing a closing } somewhere. I would restore to your original version, test the board, and if it works carefully go through the changes again.

BlueRook
Registered User
Posts: 2892
Joined: Wed Mar 10, 2004 2:38 am

Post by BlueRook » Tue Mar 08, 2005 2:26 am

Detrusor, are you using a CMS addon, something like Post-Nuke, or a port of phpBB? Because that code doesn't exist in a vanilla install of phpBB. You will need to contact the support of whoever did your port/cms.

BlueRook
Registered User
Posts: 2892
Joined: Wed Mar 10, 2004 2:38 am

Post by BlueRook » Tue Mar 08, 2005 2:28 am

Oztrance, check all the files that were modified and make sure that there are no spaces after the ?> at the end of the files.

BlueRook
Registered User
Posts: 2892
Joined: Wed Mar 10, 2004 2:38 am

Post by BlueRook » Tue Mar 08, 2005 2:34 am

JT-KGY wrote: Hi! I updated my phpbb from 2.0.10 to 2.0.11 then 2.0.12..

then I discover that whenever I post/reply with ' then I get an sql error.


I've been looking and I haven't seen that you have posted the actual error you get. I looked at your common.php code that you posted and as far as I can tell it is the same that comes with 2.0.12, so that shouldn't be the problem barring that you didn't miss a change somewhere else.

JT-KGY
Registered User
Posts: 12
Joined: Wed Mar 02, 2005 9:47 am

Post by JT-KGY » Tue Mar 08, 2005 2:34 am

Could someone also give me a hand... Please.
:(

BlueRook
Registered User
Posts: 2892
Joined: Wed Mar 10, 2004 2:38 am

Post by BlueRook » Tue Mar 08, 2005 2:34 am

JT-KGY wrote: Could someone also give me a hand... Please.
:(


Check above.

PCTalk
Registered User
Posts: 259
Joined: Mon Jul 29, 2002 5:17 pm
Location: MD, USA
Contact:

Post by PCTalk » Tue Mar 08, 2005 4:38 am

BlueRook wrote: PCTalk, do you have and MODs that affect your database backup functions? Such as the Complete Database Backup MOD? If so then that is most likely the cause of your difference.


Yes, I do have the Complete Database Backup MOD installed. Does that mean I can safely ignore that one section?

[Added]
OK, followed your link and answered my own question, thanks!
ultima528 wrote:

Code: Select all

$tables[] = 'links';
That line was only added by Niels so that the links table is backed up when you want to back up. The need to add that has been removed by this MOD, so it automatically backs the table up (assuming you choose that in the options).

Basically, you don't need to add that line for the Links MOD to work properly, and not adding it will not affect your ability to back the links table up (assuming you have installed my MOD).


I know they were talking about adding "links" but conceivably it now creates a dynamic list of tables, so there is no more need to add each individual table.
Visit PCTalk.info to see my teaching website.
Wildtangent has closed their forum. See my member created substitute at Wildtangent Fansite.
Support Request Template - Knowledge Base

JT-KGY
Registered User
Posts: 12
Joined: Wed Mar 02, 2005 9:47 am

Post by JT-KGY » Tue Mar 08, 2005 5:35 am

BlueRook wrote:
JT-KGY wrote:Could someone also give me a hand... Please.
:(


Check above.


Thank you, here's the error I got...functions_post.php
SQL Error : 1064 You have an error in your SQL syntax near ''mllkjlkjl'')' at line 1

INSERT INTO phpbb2_posts_text (post_id, post_subject, bbcode_uid, post_text) VALUES (37484, '', '563b8947c8', 'mllkjlkjl'')


This happens in ANY SQL call that has includes ' fails...
I saw that common.php is supposed to call addslashes to all parameters..
looks like that stop happening after I upgrade to 2.0.12

I tried backdate the common.php back to 2.0.10.. then posting with '
went through successfully... but of course I can't be using that version
since I have already updated everything else (including DB) to
2.0.12

I am using a 3rd party customized style.. will this be a problem?
I have no problem using the style with 2.0.10 code though.
Last edited by JT-KGY on Tue Mar 08, 2005 5:41 am, edited 1 time in total.

JT-KGY
Registered User
Posts: 12
Joined: Wed Mar 02, 2005 9:47 am

Post by JT-KGY » Tue Mar 08, 2005 5:39 am

JT-KGY wrote:
BlueRook wrote:
JT-KGY wrote:Could someone also give me a hand... Please.
:(


Check above.


Thank you, here's the error I got...functions_post.php
SQL Error : 1064 You have an error in your SQL syntax near ''mllkjlkjl'')' at line 1

INSERT INTO phpbb2_posts_text (post_id, post_subject, bbcode_uid, post_text) VALUES (37484, '', '563b8947c8', 'mllkjlkjl'')


This happens in ANY SQL call that has includes ' fails...
I saw that common.php is supposed to call addslashes to all parameters..
looks like that stop happening after I upgrade to 2.0.12

I tried backdate the common.php back to 2.0.10.. then posting with '
went through successfully... but of course I can't be using that version
since I have already updated everything else (including DB) to
2.0.12

I am using a 3rd party customized style.. will this be a problem?
I have no problem using the style with 2.0.10 code though.

BlueRook
Registered User
Posts: 2892
Joined: Wed Mar 10, 2004 2:38 am

Post by BlueRook » Tue Mar 08, 2005 5:54 am

There appears to be an extra quote in that line

Code: Select all

INSERT INTO phpbb2_posts_text (post_id, post_subject, bbcode_uid, post_text) VALUES (37484, '', '563b8947c8', 'mllkjlkjl'')

BlueRook
Registered User
Posts: 2892
Joined: Wed Mar 10, 2004 2:38 am

Post by BlueRook » Tue Mar 08, 2005 6:05 am

I've looked at all the changes from 2.0.10 to now and I don't see any changes to the posting functions. So I'm wondering if you have a problem with some other edit you made.

Post Reply

Return to “[2.0.x] MOD Database Releases”