phpBB

Code Changes

File: phpbb/module/module_manager.php

  Unmodified   Added   Modified   Removed
Line 311Line 311
				// we're turning a category into a module
$branch = $this->get_module_branch($module_data['module_id'], $module_data['module_class'], 'children', false);


				// we're turning a category into a module
$branch = $this->get_module_branch($module_data['module_id'], $module_data['module_class'], 'children', false);


				if (sizeof($branch))

				if (count($branch))

				{
throw new module_not_found_exception('NO_CATEGORY_TO_MODULE');
}

				{
throw new module_not_found_exception('NO_CATEGORY_TO_MODULE');
}

Line 353Line 353
		}

$from_data = $moved_modules[0];

		}

$from_data = $moved_modules[0];

		$diff = sizeof($moved_modules) * 2;

		$diff = count($moved_modules) * 2;


$moved_ids = array();


$moved_ids = array();

		for ($i = 0, $size = sizeof($moved_modules); $i < $size; ++$i)

		for ($i = 0, $size = count($moved_modules); $i < $size; ++$i)

		{
$moved_ids[] = $moved_modules[$i]['module_id'];
}

		{
$moved_ids[] = $moved_modules[$i]['module_id'];
}

Line 443Line 443

$branch = $this->get_module_branch($module_id, $module_class, 'children', false);



$branch = $this->get_module_branch($module_id, $module_class, 'children', false);


		if (sizeof($branch))

		if (count($branch))

		{
throw new module_exception('CANNOT_REMOVE_MODULE');
}

		{
throw new module_exception('CANNOT_REMOVE_MODULE');
}

Line 506Line 506
		}
$this->db->sql_freeresult($result);


		}
$this->db->sql_freeresult($result);


		if (!sizeof($target))

		if (!count($target))

		{
// The module is already on top or bottom
throw new module_not_found_exception();

		{
// The module is already on top or bottom
throw new module_not_found_exception();