aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_database.php
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2007-05-11 20:53:51 +0000
committerDavid M <davidmj@users.sourceforge.net>2007-05-11 20:53:51 +0000
commit46a58a7adde0bf5158c5b3164a917893bcb4f6c7 (patch)
tree1ce23a9b47b6499fb084a3c776a315ac11979cf3 /phpBB/includes/acp/acp_database.php
parentf432162563d6ee780d86c73d216372f4d82f5ee5 (diff)
downloadforums-46a58a7adde0bf5158c5b3164a917893bcb4f6c7.tar
forums-46a58a7adde0bf5158c5b3164a917893bcb4f6c7.tar.gz
forums-46a58a7adde0bf5158c5b3164a917893bcb4f6c7.tar.bz2
forums-46a58a7adde0bf5158c5b3164a917893bcb4f6c7.tar.xz
forums-46a58a7adde0bf5158c5b3164a917893bcb4f6c7.zip
#10715
git-svn-id: file:///svn/phpbb/trunk@7530 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_database.php')
-rw-r--r--phpBB/includes/acp/acp_database.php42
1 files changed, 21 insertions, 21 deletions
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index b09caa6fc0..051362af66 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -1016,7 +1016,7 @@ class sqlite_extractor extends base_extractor
}
else if (strpos($col_types[$column_name], 'text') !== false || strpos($col_types[$column_name], 'char') !== false || strpos($col_types[$column_name], 'blob') !== false)
{
- $row[$column_name] = "'" . sanitize_data_generic(str_replace("'", "''", $column_data)) . "'";
+ $row[$column_name] = sanitize_data_generic(str_replace("'", "''", $column_data));
}
}
$this->flush($sql_insert . implode(', ', $row) . ");\n");
@@ -1517,8 +1517,8 @@ class mssql_extractor extends base_extractor
if (preg_match('#char|text|bool|varbinary#i', $ary_type[$i]))
{
- $str_quote = "'";
- $str_empty = '';
+ $str_quote = '';
+ $str_empty = "''";
$str_val = sanitize_data_mssql(str_replace("'", "''", $str_val));
}
else if (preg_match('#date|timestamp#i', $ary_type[$i]))
@@ -1611,8 +1611,8 @@ class mssql_extractor extends base_extractor
if (preg_match('#char|text|bool|varbinary#i', $ary_type[$i]))
{
- $str_quote = "'";
- $str_empty = '';
+ $str_quote = '';
+ $str_empty = "''";
$str_val = sanitize_data_mssql(str_replace("'", "''", $str_val));
}
else if (preg_match('#date|timestamp#i', $ary_type[$i]))
@@ -1813,8 +1813,8 @@ class oracle_extractor extends base_extractor
if (preg_match('#char|text|bool|raw#i', $ary_type[$i]))
{
- $str_quote = "'";
- $str_empty = '';
+ $str_quote = '';
+ $str_empty = "''";
$str_val = sanitize_data_oracle($str_val);
}
else if (preg_match('#date|timestamp#i', $ary_type[$i]))
@@ -1908,8 +1908,8 @@ class firebird_extractor extends base_extractor
if (preg_match('#char|text|bool|varbinary|blob#i', $ary_type[$i]))
{
- $str_quote = "'";
- $str_empty = '';
+ $str_quote = '';
+ $str_empty = "''";
$str_val = sanitize_data_generic(str_replace("'", "''", $str_val));
}
else if (preg_match('#date|timestamp#i', $ary_type[$i]))
@@ -2144,21 +2144,21 @@ function sanitize_data_mssql($text)
{
$data = preg_split('/[\n\t\r\b\f]/', $text);
preg_match_all('/[\n\t\r\b\f]/', $text, $matches);
-
+
$val = array();
-
+
foreach ($data as $value)
{
if (strlen($value))
{
- $val[] = $value;
+ $val[] = "'" . $value . "'";
}
if (sizeof($matches[0]))
{
$val[] = 'char(' . ord(array_shift($matches[0])) . ')';
}
}
-
+
return implode('+', $val);
}
@@ -2166,21 +2166,21 @@ function sanitize_data_oracle($text)
{
$data = preg_split('/[\0\n\t\r\b\f\'"\\\]/', $text);
preg_match_all('/[\0\n\t\r\b\f\'"\\\]/', $text, $matches);
-
+
$val = array();
-
+
foreach ($data as $value)
{
if (strlen($value))
{
- $val[] = $value;
+ $val[] = "'" . $value . "'";
}
if (sizeof($matches[0]))
{
$val[] = 'chr(' . ord(array_shift($matches[0])) . ')';
}
}
-
+
return implode('||', $val);
}
@@ -2188,21 +2188,21 @@ function sanitize_data_generic($text)
{
$data = preg_split('/[\n\t\r\b\f]/', $text);
preg_match_all('/[\n\t\r\b\f]/', $text, $matches);
-
+
$val = array();
-
+
foreach ($data as $value)
{
if (strlen($value))
{
- $val[] = $value;
+ $val[] = "'" . $value . "'";
}
if (sizeof($matches[0]))
{
$val[] = "'" . array_shift($matches[0]) . "'";
}
}
-
+
return implode('||', $val);
}