From ee37e43981067faa23f0d468902e064fe0639816 Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Fri, 30 Sep 2011 12:09:47 +0200 Subject: [PATCH] Removed magic quotes check from database functions. Due the changes in the last version, the check was no obselete. --- src/include/functions_db.php | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/include/functions_db.php b/src/include/functions_db.php index 69406cb..17fe80c 100644 --- a/src/include/functions_db.php +++ b/src/include/functions_db.php @@ -243,34 +243,23 @@ function DB_RemoveBadChars($myString, $dbEngine = DB_MYSQL, $bForceStripSlahes = { if ( $dbEngine == DB_MSSQL ) { -//TODO STRIP SLASHES ?! // MSSQL needs special treatment -.- return str_replace("'","''",$myString); } else { // Replace with internal PHP Functions! - if ( !get_magic_quotes_gpc() || $bForceStripSlahes ) - return addslashes($myString); - // return addcslashes($myString, "'"); - else - return $myString; + return addslashes($myString); } - -/* - $returnstr = str_replace("\\","\\\\",$myString); - $returnstr = str_replace("'","\\'",$returnstr); - return $returnstr; -*/ } function DB_StripSlahes($myString) { // Replace with internal PHP Functions! - if ( get_magic_quotes_gpc() ) +// if ( get_magic_quotes_gpc() ) return stripslashes($myString); - else - return $myString; +// else +// return $myString; } function DB_ReturnLastInsertID($myResult = false)