[ticket/14831] Optimize code construction

PHPBB3-14831
This commit is contained in:
rxu 2016-10-24 01:41:24 +07:00
parent 849cd74700
commit 77f1bac64b

View file

@ -91,14 +91,12 @@ class module implements \phpbb\db\migration\tool\tool_interface
if ($parent !== false)
{
$parent = $this->get_parent_module_id($parent, $module, false);
if ($parent !== false)
{
$parent_sql = 'AND parent_id = ' . (int) $parent;
}
else
if ($parent === false)
{
return false;
}
$parent_sql = 'AND parent_id = ' . (int) $parent;
}
$sql = 'SELECT module_id