Bug tracker

This ticket has been moved to our new tracker. Open Ticket PHPBB3-9473 now.

COPPA not set correctly (fix completed in vcs)

If COPPA is not used in phpBB2, it is set in phpBB3 and vice-versa.

In phpBB2, if an address is entered in "COPPA Mailing Address," it is assumed that COPPA is to be used.

The phpBB2 convertor has
Code: Select all
'coppa_enable'         => 'is_empty(coppa_mail)',

If no address is entered, is_empty returns TRUE, which sets COPPA in phpBB3 to be used.
If an address is entered, is_empty returns FALSE, which sets COPPA in phpBB3 to NOT be used.

What is needed is a function such as not_empty.
Code: Select all
function phpbb_not_empty($var)
{
   return not(is_empty($var));
}

Comments / History

Posted by D¡cky (Support Team Member) on Sep 5th 2009, 00:05

Actually, this is better:
In convert_phpbb20.php
Code: Select all
'coppa_enable'         => 'phpbb_is_boolean(coppa_mail)',

In functions_phpbb20.php
Code: Select all
function phpbb_is_boolean($var)
{
   return (bool) $var;
}


Even better would be to include the function in functions_convert.php. If there is is_empty, why not the opposite?

Posted by Acyd Burn (Server Manager) on Sep 15th 2009, 15:33

what about !is_empty()? Does the convertor catch this? ;)

Posted by D¡cky (Support Team Member) on Sep 15th 2009, 17:06

!is_empty() does work. It sets the coppa_enable config_value to 1 when phpBB2 coppa_mail is not empty, but does not enter 0 when phpBB2 coppa_mail is empty. It makes config_value blank. phpBB3 does read the blank field as not being set, so should not be a problem.

Linked ticket with changeset: r10148

Action performed by Acyd Burn (Server Manager) on Sep 15th 2009, 19:01

Changed ticket status from "New" to "Fix completed in SVN"

Action performed by Acyd Burn (Server Manager) on Sep 15th 2009, 19:02

Ticket details

Related SVN changesets