diff --git a/src/adodb5/adodb.inc.php b/src/adodb5/adodb.inc.php index dd9b9010..03725588 100644 --- a/src/adodb5/adodb.inc.php +++ b/src/adodb5/adodb.inc.php @@ -2612,7 +2612,7 @@ function addq($s,$magic_quotes=false) // undo magic quotes for " $s = str_replace('\\"','"',$s); - if ($this->replaceQuote == "\\'" || ini_get('magic_quotes_sybase')) // ' already quoted, no need to change anything + if ($this->replaceQuote == "\\'") // ' already quoted, no need to change anything return $s; else {// change \' to '' for sybase/mssql $s = str_replace('\\\\','\\',$s); @@ -2646,7 +2646,7 @@ function qstr($s,$magic_quotes=false) // undo magic quotes for " $s = str_replace('\\"','"',$s); - if ($this->replaceQuote == "\\'" || ini_get('magic_quotes_sybase')) // ' already quoted, no need to change anything + if ($this->replaceQuote == "\\'") // ' already quoted, no need to change anything return "'$s'"; else {// change \' to '' for sybase/mssql $s = str_replace('\\\\','\\',$s); diff --git a/src/adodb5/drivers/adodb-mssql.inc.php b/src/adodb5/drivers/adodb-mssql.inc.php index e03d1cf8..042b448c 100644 --- a/src/adodb5/drivers/adodb-mssql.inc.php +++ b/src/adodb5/drivers/adodb-mssql.inc.php @@ -180,18 +180,13 @@ function qstr($s,$magic_quotes=false) } // undo magic quotes for " unless sybase is on - $sybase = ini_get('magic_quotes_sybase'); - if (!$sybase) { - $s = str_replace('\\"','"',$s); - if ($this->replaceQuote == "\\'") // ' already quoted, no need to change anything - return "'$s'"; - else {// change \' to '' for sybase/mssql - $s = str_replace('\\\\','\\',$s); - return "'".str_replace("\\'",$this->replaceQuote,$s)."'"; - } - } else { - return "'".$s."'"; - } + $s = str_replace('\\"','"',$s); + if ($this->replaceQuote == "\\'") // ' already quoted, no need to change anything + return "'$s'"; + else {// change \' to '' for sybase/mssql + $s = str_replace('\\\\','\\',$s); + return "'".str_replace("\\'",$this->replaceQuote,$s)."'"; + } } // moodle change end - see readme_moodle.txt @@ -1096,4 +1091,4 @@ static function UnixTimeStamp($v) http://www.databasejournal.com/scripts/article.php/1440551 */ -?> \ No newline at end of file +?> diff --git a/src/adodb5/drivers/adodb-oci8.inc.php b/src/adodb5/drivers/adodb-oci8.inc.php index a8dcad89..8cca5539 100644 --- a/src/adodb5/drivers/adodb-oci8.inc.php +++ b/src/adodb5/drivers/adodb-oci8.inc.php @@ -1296,13 +1296,9 @@ function qstr($s,$magic_quotes=false) } // undo magic quotes for " unless sybase is on - if (!ini_get('magic_quotes_sybase')) { - $s = str_replace('\\"','"',$s); - $s = str_replace('\\\\','\\',$s); - return "'".str_replace("\\'",$this->replaceQuote,$s)."'"; - } else { - return "'".$s."'"; - } + $s = str_replace('\\"','"',$s); + $s = str_replace('\\\\','\\',$s); + return "'".str_replace("\\'",$this->replaceQuote,$s)."'"; } } @@ -1613,4 +1609,4 @@ function MoveNext() return adodb_movenext($this); } } -?> \ No newline at end of file +?>