git-svn-id: file:///svn/phpbb/trunk@7530 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
David M 2007-05-11 20:53:51 +00:00
parent f432162563
commit 46a58a7add

View file

@ -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) 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"); $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])) if (preg_match('#char|text|bool|varbinary#i', $ary_type[$i]))
{ {
$str_quote = "'"; $str_quote = '';
$str_empty = ''; $str_empty = "''";
$str_val = sanitize_data_mssql(str_replace("'", "''", $str_val)); $str_val = sanitize_data_mssql(str_replace("'", "''", $str_val));
} }
else if (preg_match('#date|timestamp#i', $ary_type[$i])) 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])) if (preg_match('#char|text|bool|varbinary#i', $ary_type[$i]))
{ {
$str_quote = "'"; $str_quote = '';
$str_empty = ''; $str_empty = "''";
$str_val = sanitize_data_mssql(str_replace("'", "''", $str_val)); $str_val = sanitize_data_mssql(str_replace("'", "''", $str_val));
} }
else if (preg_match('#date|timestamp#i', $ary_type[$i])) 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])) if (preg_match('#char|text|bool|raw#i', $ary_type[$i]))
{ {
$str_quote = "'"; $str_quote = '';
$str_empty = ''; $str_empty = "''";
$str_val = sanitize_data_oracle($str_val); $str_val = sanitize_data_oracle($str_val);
} }
else if (preg_match('#date|timestamp#i', $ary_type[$i])) 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])) if (preg_match('#char|text|bool|varbinary|blob#i', $ary_type[$i]))
{ {
$str_quote = "'"; $str_quote = '';
$str_empty = ''; $str_empty = "''";
$str_val = sanitize_data_generic(str_replace("'", "''", $str_val)); $str_val = sanitize_data_generic(str_replace("'", "''", $str_val));
} }
else if (preg_match('#date|timestamp#i', $ary_type[$i])) else if (preg_match('#date|timestamp#i', $ary_type[$i]))
@ -2151,7 +2151,7 @@ function sanitize_data_mssql($text)
{ {
if (strlen($value)) if (strlen($value))
{ {
$val[] = $value; $val[] = "'" . $value . "'";
} }
if (sizeof($matches[0])) if (sizeof($matches[0]))
{ {
@ -2173,7 +2173,7 @@ function sanitize_data_oracle($text)
{ {
if (strlen($value)) if (strlen($value))
{ {
$val[] = $value; $val[] = "'" . $value . "'";
} }
if (sizeof($matches[0])) if (sizeof($matches[0]))
{ {
@ -2195,7 +2195,7 @@ function sanitize_data_generic($text)
{ {
if (strlen($value)) if (strlen($value))
{ {
$val[] = $value; $val[] = "'" . $value . "'";
} }
if (sizeof($matches[0])) if (sizeof($matches[0]))
{ {