phpBB

Code Changes

File: phpbb/db/migration/tool/module.php

  Unmodified   Added   Modified   Removed
Line 86Line 86
	* 		check for to see if it exists
* @param bool $lazy Checks lazily if the module exists. Returns true if it exists in at
* least one given parent.

	* 		check for to see if it exists
* @param bool $lazy Checks lazily if the module exists. Returns true if it exists in at
* least one given parent.

	* @return bool true if module exists in *all* given parents, false if not


	* @return bool true if module exists in *all* given parents, false if not in any given parent;
* true if ignoring parent check and module exists class wide, false if not found at all.

	*/
public function exists($class, $parent, $module, $lazy = false)
{

	*/
public function exists($class, $parent, $module, $lazy = false)
{

Line 109Line 110
			{
$parent_sqls[] = 'AND parent_id = ' . (int) $parent_id;
}

			{
$parent_sqls[] = 'AND parent_id = ' . (int) $parent_id;
}

 
		}
else
{
$parent_sqls[] = '';

		}

foreach ($parent_sqls as $parent_sql)

		}

foreach ($parent_sqls as $parent_sql)

Line 126Line 131
			{
return false;
}

			{
return false;
}

			else if ($lazy && $module_id)

			if ($lazy && $module_id)

			{
return true;
}

			{
return true;
}

Line 513Line 518
	{
// Allow '' to be sent as 0
$parent_id = $parent_id ?: 0;

	{
// Allow '' to be sent as 0
$parent_id = $parent_id ?: 0;


// If automatic adding is in action, convert array back to string to simplify things
if (is_array($data) && count($data) == 1)
{
$data = $data['module_langname'];
}

 

if (!is_numeric($parent_id))
{


if (!is_numeric($parent_id))
{