Set magic_quotes_sybase for both mssql and oci8po.

Anyway, this isn't enough and if must be defined in php.ini
or .htaccess, because GPC are added BEFORE this setting
has effect so they are slashed with the default char.
This commit is contained in:
stronk7 2006-08-27 21:57:33 +00:00
parent de64b6c69e
commit 3655a6b39f

View File

@ -1336,21 +1336,29 @@ function configure_dbconnection() {
if ($CFG->unicodedb) {
$db->Execute("SET NAMES 'utf8'");
}
break;
break;
case 'postgres7':
/// Set names if needed
if ($CFG->unicodedb) {
$db->Execute("SET NAMES 'utf8'");
}
break;
break;
case 'mssql':
/// No need to set charset. It must be specified in the driver conf
/// Allow quoted identifiers
$db->Execute('SET QUOTED_IDENTIFIER ON');
break;
case 'oracle':
/// Enable sybase quotes, so addslashes and stripslashes will use "'"
ini_set('magic_quotes_sybase', '1');
/// NOTE: Not 100% useful because GPC has been addslashed with the setting off
/// so IT'S MANDATORY TO CHANGE THIS UNDER php.ini or .htaccess for this DB
break;
case 'oci8po':
/// No need to set charset. It must be specified by the NLS_LANG env. variable
break;
/// Enable sybase quotes, so addslashes and stripslashes will use "'"
ini_set('magic_quotes_sybase', '1');
/// NOTE: Not 100% useful because GPC has been addslashed with the setting off
/// so IT'S MANDATORY TO ENABLE THIS UNDER php.ini or .htaccess for this DB
break;
}
}