1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00
#9569


git-svn-id: file:///svn/phpbb/trunk@7302 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2007-04-08 15:14:50 +00:00
parent 539ac00f02
commit 281c8763bd
3 changed files with 11 additions and 12 deletions

View File

@@ -721,7 +721,6 @@ class acp_modules
if (!isset($module_data['module_id']))
{
// no module_id means we're creating a new category/module
if ($module_data['parent_id'])
{
$sql = 'SELECT left_id, right_id
@@ -754,8 +753,8 @@ class acp_modules
AND {$row['left_id']} BETWEEN left_id AND right_id";
$db->sql_query($sql);
$module_data['left_id'] = $row['right_id'];
$module_data['right_id'] = $row['right_id'] + 1;
$module_data['left_id'] = (int) $row['right_id'];
$module_data['right_id'] = (int) $row['right_id'] + 1;
}
else
{
@@ -766,8 +765,8 @@ class acp_modules
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$module_data['left_id'] = $row['right_id'] + 1;
$module_data['right_id'] = $row['right_id'] + 2;
$module_data['left_id'] = (int) $row['right_id'] + 1;
$module_data['right_id'] = (int) $row['right_id'] + 2;
}
$sql = 'INSERT INTO ' . MODULES_TABLE . ' ' . $db->sql_build_array('INSERT', $module_data);