aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-07-27 17:33:27 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-07-27 17:33:27 +0000
commitacf0c0ddebf13b6075b6dac81c7675dd04d4a692 (patch)
treeb2452341efa35b710560ea75e70401b0f5c474c2 /phpBB/install
parent92c25a3e6c99bb071710b2f5dc5939262924233c (diff)
downloadforums-acf0c0ddebf13b6075b6dac81c7675dd04d4a692.tar
forums-acf0c0ddebf13b6075b6dac81c7675dd04d4a692.tar.gz
forums-acf0c0ddebf13b6075b6dac81c7675dd04d4a692.tar.bz2
forums-acf0c0ddebf13b6075b6dac81c7675dd04d4a692.tar.xz
forums-acf0c0ddebf13b6075b6dac81c7675dd04d4a692.zip
err, forgot to commit
git-svn-id: file:///svn/phpbb/trunk@7961 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install')
-rw-r--r--phpBB/install/convertors/functions_phpbb20.php22
-rwxr-xr-xphpBB/install/install_install.php20
2 files changed, 21 insertions, 21 deletions
diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php
index 7daefabdce..ab1a1ede11 100644
--- a/phpBB/install/convertors/functions_phpbb20.php
+++ b/phpBB/install/convertors/functions_phpbb20.php
@@ -97,7 +97,7 @@ function phpbb_insert_forums()
while ($row = $src_db->sql_fetchrow($result))
{
$sql_ary = array(
- 'forum_id' => $max_forum_id,
+ 'forum_id' => (int) $max_forum_id,
'forum_name' => ($row['cat_title']) ? htmlspecialchars(phpbb_set_default_encoding($row['cat_title']), ENT_COMPAT, 'UTF-8') : $user->lang['CATEGORY'],
'parent_id' => 0,
'forum_parents' => '',
@@ -113,8 +113,8 @@ function phpbb_insert_forums()
$cat_row = $db->sql_fetchrow($_result);
$db->sql_freeresult($_result);
- $sql_ary['left_id'] = $cat_row['right_id'] + 1;
- $sql_ary['right_id'] = $cat_row['right_id'] + 2;
+ $sql_ary['left_id'] = (int) ($cat_row['right_id'] + 1);
+ $sql_ary['right_id'] = (int) ($cat_row['right_id'] + 2);
$sql = 'INSERT INTO ' . FORUMS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
$db->sql_query($sql);
@@ -148,8 +148,8 @@ function phpbb_insert_forums()
$unknown_cat_id = 'ghost';
$sql_ary = array(
- 'forum_id' => $max_forum_id,
- 'forum_name' => $user->lang['CATEGORY'],
+ 'forum_id' => (int) $max_forum_id,
+ 'forum_name' => (string) $user->lang['CATEGORY'],
'parent_id' => 0,
'forum_parents' => '',
'forum_desc' => '',
@@ -164,8 +164,8 @@ function phpbb_insert_forums()
$cat_row = $db->sql_fetchrow($_result);
$db->sql_freeresult($_result);
- $sql_ary['left_id'] = $cat_row['right_id'] + 1;
- $sql_ary['right_id'] = $cat_row['right_id'] + 2;
+ $sql_ary['left_id'] = (int) ($cat_row['right_id'] + 1);
+ $sql_ary['right_id'] = (int) ($cat_row['right_id'] + 2);
$sql = 'INSERT INTO ' . FORUMS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
$db->sql_query($sql);
@@ -210,7 +210,7 @@ function phpbb_insert_forums()
$sql_ary = array(
'forum_id' => (int) $row['forum_id'],
'forum_name' => htmlspecialchars(phpbb_set_default_encoding($row['forum_name']), ENT_COMPAT, 'UTF-8'),
- 'parent_id' => $cats_added[$row['cat_id']],
+ 'parent_id' => (int) $cats_added[$row['cat_id']],
'forum_parents' => '',
'forum_desc' => htmlspecialchars(phpbb_set_default_encoding($row['forum_desc']), ENT_COMPAT, 'UTF-8'),
'forum_type' => FORUM_POST,
@@ -269,8 +269,8 @@ function phpbb_insert_forums()
WHERE ' . $cat_row['left_id'] . ' BETWEEN left_id AND right_id';
$db->sql_query($sql);
- $sql_ary['left_id'] = $cat_row['right_id'];
- $sql_ary['right_id'] = $cat_row['right_id'] + 1;
+ $sql_ary['left_id'] = (int) $cat_row['right_id'];
+ $sql_ary['right_id'] = (int) ($cat_row['right_id'] + 1);
$sql = 'INSERT INTO ' . FORUMS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
$db->sql_query($sql);
@@ -1778,7 +1778,7 @@ function phpbb_check_username_collisions()
while ($row = $src_db->sql_fetchrow($result))
{
$clean_name = utf8_clean_string(phpbb_set_default_encoding($row['username']));
- $insert_ary[] = array('user_id' => $row['user_id'], 'username_clean' => $clean_name);
+ $insert_ary[] = array('user_id' => (int) $row['user_id'], 'username_clean' => (string) $clean_name);
if ($i % 1000 == 999)
{
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index f6a8613ae8..4dd7e73db5 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1738,12 +1738,12 @@ class install_install extends module
if (in_array($image_name, $valid_localized))
{
$sql_ary[] = array(
- 'image_name' => $image_name,
- 'image_filename' => $image_filename,
- 'image_height' => $image_height,
- 'image_width' => $image_width,
- 'imageset_id' => $imageset_row['imageset_id'],
- 'image_lang' => $lang_pack['lang_iso'],
+ 'image_name' => (string) $image_name,
+ 'image_filename' => (string) $image_filename,
+ 'image_height' => (int) $image_height,
+ 'image_width' => (int) $image_width,
+ 'imageset_id' => (int) $imageset_row['imageset_id'],
+ 'image_lang' => (string) $lang_pack['lang_iso'],
);
}
}
@@ -1835,10 +1835,10 @@ class install_install extends module
$sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
'bot_active' => 1,
- 'bot_name' => $bot_name,
- 'user_id' => $user_id,
- 'bot_agent' => $bot_ary[0],
- 'bot_ip' => $bot_ary[1],
+ 'bot_name' => (string) $bot_name,
+ 'user_id' => (int) $user_id,
+ 'bot_agent' => (string) $bot_ary[0],
+ 'bot_ip' => (string) $bot_ary[1],
));
$result = $db->sql_query($sql);