aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/db
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/db')
-rw-r--r--phpBB/db/mssql.php9
-rw-r--r--phpBB/db/mysql.php5
-rw-r--r--phpBB/db/mysql4.php5
3 files changed, 7 insertions, 12 deletions
diff --git a/phpBB/db/mssql.php b/phpBB/db/mssql.php
index 6cf118b22a..c54067f822 100644
--- a/phpBB/db/mssql.php
+++ b/phpBB/db/mssql.php
@@ -403,14 +403,9 @@ class sql_db
return ( $query_id ) ? mssql_free_result($query_id) : false;
}
- function sql_quote($sql)
+ function sql_escape($msg)
{
- return str_replace("\'", "''", $sql);
- }
-
- function sql_escape($sql)
- {
- return str_replace("'", "''", str_replace('\\', '\\\\', $sql));
+ return str_replace("'", "''", str_replace('\\', '\\\\', $msg));
}
function sql_error($query_id = 0)
diff --git a/phpBB/db/mysql.php b/phpBB/db/mysql.php
index 132b64f79f..256a7361ad 100644
--- a/phpBB/db/mysql.php
+++ b/phpBB/db/mysql.php
@@ -379,6 +379,11 @@ class sql_db
return ( $query_id ) ? @mysql_free_result($query_id) : false;
}
+ function sql_escape($msg)
+ {
+ return mysql_escape_string($msg);
+ }
+
function sql_error($sql = '')
{
if ( !$this->return_on_error )
diff --git a/phpBB/db/mysql4.php b/phpBB/db/mysql4.php
index d6f00ed1d6..1c75cf7139 100644
--- a/phpBB/db/mysql4.php
+++ b/phpBB/db/mysql4.php
@@ -379,11 +379,6 @@ if (!empty($_REQUEST['explain']))
return ( $query_id ) ? @mysql_free_result($query_id) : false;
}
- function sql_quote($msg)
- {
- return mysql_escape_string($msg);
- }
-
function sql_escape($msg)
{
return mysql_escape_string($msg);