2011-03-02 Miguel de Dios <miguel.dedios@artica.es>

* include/db/postgresql.php, include/db/mysql.php, include/functions.php:
	separate the function "mysql_safe_sql_string" into the two version for MySQL
	and PostgreSQL engine.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4047 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2011-03-02 14:33:24 +00:00
parent 3cddefe355
commit 091d81f51b
2 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2011-03-02 Miguel de Dios <miguel.dedios@artica.es>
* include/db/postgresql.php, include/db/mysql.php, include/functions.php:
separate the function "mysql_safe_sql_string" into the two version for MySQL
and PostgreSQL engine.
2011-03-02 Miguel de Dios <miguel.dedios@artica.es> 2011-03-02 Miguel de Dios <miguel.dedios@artica.es>
* include/db/postgresql.php: fixed in the function * include/db/postgresql.php: fixed in the function

View File

@ -936,4 +936,18 @@ function mysql_process_sql_rollback() {
mysql_query ('ROLLBACK '); mysql_query ('ROLLBACK ');
mysql_query ('SET AUTOCOMMIT = 0'); mysql_query ('SET AUTOCOMMIT = 0');
} }
/**
* Put quotes if magic_quotes protection
*
* @param string Text string to be protected with quotes if magic_quotes protection is disabled
*/
function mysql_safe_sql_string($string) {
if (get_magic_quotes_gpc () == 0)
return $string;
global $config;
return mysql_real_escape_string($string, $config['dbconnection']);
}
?> ?>