aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-04-08 15:14:50 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-04-08 15:14:50 +0000
commit281c8763bd2f3d7e9dd83e7e7772009f18a69b86 (patch)
tree2e2f45e29fb06a44870e953b001307b4d7ee2cba /phpBB/includes
parent539ac00f02f24266f598fb746b2e145e1ec46182 (diff)
downloadforums-281c8763bd2f3d7e9dd83e7e7772009f18a69b86.tar
forums-281c8763bd2f3d7e9dd83e7e7772009f18a69b86.tar.gz
forums-281c8763bd2f3d7e9dd83e7e7772009f18a69b86.tar.bz2
forums-281c8763bd2f3d7e9dd83e7e7772009f18a69b86.tar.xz
forums-281c8763bd2f3d7e9dd83e7e7772009f18a69b86.zip
#9659
#9569 git-svn-id: file:///svn/phpbb/trunk@7302 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_modules.php9
-rw-r--r--phpBB/includes/functions_convert.php2
2 files changed, 5 insertions, 6 deletions
diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php
index e82365d0a5..585549fb99 100644
--- a/phpBB/includes/acp/acp_modules.php
+++ b/phpBB/includes/acp/acp_modules.php
@@ -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);
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index f2988792a6..8aa8f597e8 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -1194,7 +1194,7 @@ function restore_config($schema)
{
if (preg_match('/(.*)\((.*)\)/', $src, $m))
{
- $var = (empty($m[2])) ? '' : "'" . addslashes($convert_config[$m[2]]) . "'";
+ $var = (empty($m[2]) || empty($convert_config[$m[2]])) ? '' : "'" . addslashes($convert_config[$m[2]]) . "'";
$exec = '$config_value = ' . $m[1] . '(' . $var . ');';
eval($exec);
}