015-0014 Admin Board Header Issues


Subject: 015-0014 Admin Board Header Issues
There are a few issues in adm/admin_board_header_banners.php

First one

Code: [Download] [Hide] [Select]
$phpbb_root_path = '../';
require_once($phpbb_root_path . 'extension.inc');
require_once('./pagestart.' . $phpEx);


Should be after

Code: [Download] [Hide] [Select]
if( !empty($setmodules) )
{
$file = basename(__FILE__);
$module['1200_Configuration']['190_MG_Configuration_Headers_Banners'] = $file;
return;
}


Second it's that when giving header banners some code with ", the result was a in front of every "

To Fix it

Find

Code: [Download] [Hide] [Select]
$new[$config_name] = addslashes($new[$config_name]);


Replace with

Code: [Download] [Hide] [Select]
$new[$config_name] = str_replace("'", "''", $new[$config_name]);


And the last one it's an issue with PHP4

I think that might be an error here with it

Code: [Download] [Hide] [Select]
$new[$config_name] = ( isset($_POST[$config_name]) ) ? $_POST[$config_name] : $default_config[$config_name];


does PHP4 support $_POST? I don't remember, but some time ago i had some problems with it

Subject: Re: 001-014 Admin Board Header Issues
  • You're right about the code block order in the adm/admin_board_header_banners.php file (and not only that one... but it is not a major issue).
  • The problem with slashes is not to be solved how you suggest... because it is wrong.
    It has to be solved in this way:
    OPEN includes/page_header.php
    FIND
    Code: [Download] [Hide] [Select]
    'HEADER_BANNER_CODE' => $board_config['header_banner_text'],
    'VIEWTOPIC_BANNER_CODE' => $board_config['viewtopic_banner_text'],

    REPLACE WITH
    Code: [Download] [Hide] [Select]
    'HEADER_BANNER_CODE' => stripslashes($board_config['header_banner_text']),
    'VIEWTOPIC_BANNER_CODE' => stripslashes($board_config['viewtopic_banner_text']),

  • No problem with the $_POST variable, it is working fine in PHP4 as well.

Subject: Re: 001-014 Admin Board Header Issues
Ok. Thanks Luca

Subject: Re: 001-014 Admin Board Header Issues
Please, let me know if this fixes the issues... since I don't have any error, I need someone else to test it for me.

Thanks.

Subject: Re: 001-014 Admin Board Header Issues
Mighty Gorgon wrote: [View Post]
Please, let me know if this fixes the issues... since I don't have any error, I need someone else to test it for me.

Thanks.


It works Mighty
I ask at phpbb-es some users that got this error to fix it in your way and got no problems

Topic locked as bug fixed
;)

Subject: Re: 001-014 Admin Board Header Issues
Great... thanks.


Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.9762s (PHP: 2% SQL: 98%)
SQL queries: 15 - Debug Off - GZIP Enabled