Revision: 12311
http://sourceforge.net/p/xoops/svn/12311
Author: rgriffith
Date: 2014-02-14 21:41:01 +0000 (Fri, 14 Feb 2014)
Log Message:
-----------
Fixes to escape() method
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/database/mysqldatabase.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/database/mysqldatabase.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/database/mysqldatabase.php 2014-02-14 18:11:08 UTC (rev 12310)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/database/mysqldatabase.php 2014-02-14 21:41:01 UTC (rev 12311)
@@ -237,20 +237,17 @@
}
/**
- * Escapes a string for use in a query. Does not add quotes.
+ * Escapes a string for use in a query. Does not add surroundin quotes.
*
* @param string $string string to escape
*
* @return string
- * @deprecated since version 2.6.0 - alpha 3. Switch to doctrine connector.
*/
public function escape($string)
{
- $this->deprecated();
+ return mysql_real_escape_string($string, $this->conn);
+ }
- return str_replace("\\\"", '"', str_replace("\\"", '"', $string));
- }
-
/**
* perform a query on the database
*
|