Merge branch 'v3-stable' into beta

This commit is contained in:
Andre Lorbach 2011-09-30 12:13:54 +02:00
commit ebbfa11852

View File

@ -257,34 +257,23 @@ function DB_RemoveBadChars($myString, $dbEngine = DB_MYSQL, $bForceStripSlahes =
{ {
if ( $dbEngine == DB_MSSQL ) if ( $dbEngine == DB_MSSQL )
{ {
//TODO STRIP SLASHES ?!
// MSSQL needs special treatment -.- // MSSQL needs special treatment -.-
return str_replace("'","''",$myString); return str_replace("'","''",$myString);
} }
else else
{ {
// Replace with internal PHP Functions! // Replace with internal PHP Functions!
if ( !get_magic_quotes_gpc() || $bForceStripSlahes ) return addslashes($myString);
return addslashes($myString);
// return addcslashes($myString, "'");
else
return $myString;
} }
/*
$returnstr = str_replace("\\","\\\\",$myString);
$returnstr = str_replace("'","\\'",$returnstr);
return $returnstr;
*/
} }
function DB_StripSlahes($myString) function DB_StripSlahes($myString)
{ {
// Replace with internal PHP Functions! // Replace with internal PHP Functions!
if ( get_magic_quotes_gpc() ) // if ( get_magic_quotes_gpc() )
return stripslashes($myString); return stripslashes($myString);
else // else
return $myString; // return $myString;
} }
function DB_ReturnLastInsertID($myResult = false) function DB_ReturnLastInsertID($myResult = false)