mdt55
Beginner


Joined: Oct 20, 2008 Posts: 7
|
Posted: Sat Nov 22, 2008 9:55 pm Post subject: Incompatibility with M2F (Mail2Forum) phpBB mod |
|
|
If you are integrating Gallery2 with phpBB and your phpBB installation includes the M2F (Mail 2 Forum) mod, you will have problems. There is a bug in the M2F file m2f_common.php that will break Gallery. The fix is relatively easy, but requires replacing a small function in m2f_common.php. Details below:
Replace the m2f_undo_add_slashes_phpBB() function at the end of m2f_common.php with the following function:
function m2f_undo_add_slashes_phpBB()
{
if( get_magic_quotes_gpc() )
{
if( is_array($_GET) )
{
$_GET = array_strip_slashes($_GET);
}
if( is_array($_POST) )
{
$_POST = array_strip_slashes($_POST);
}
}
}
and add the following function:
function array_strip_slashes($inarray)
{
while(list($key, $value) = each($inarray))
{
if (is_array($inarray[$key]))
$inarray[$key] = array_strip_slashes($inarray[$key]);
else
$inarray[$key] = stripslashes($value);
}
return($inarray);
} |
|