"- fixed bug introduced with r25260: connection charset for PDO connection was not longer set, causing utf8 filenames written to mysql, which thinks we are talking latin1 (mysql default)

- also fixed wrong DSN for mysqlt"
This commit is contained in:
Ralf Becker 2008-04-30 19:00:14 +00:00
parent 3e1c305a7c
commit 9df4251058

View File

@ -1280,7 +1280,7 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
switch($type)
{
default:
$dsn = $egw_db->Type.':host='.$egw_db->Host.';port='.$egw_db->Port.';dbname='.$egw_db->Database;
$dsn = $type.':host='.$egw_db->Host.';port='.$egw_db->Port.';dbname='.$egw_db->Database;
break;
}
try {
@ -1291,7 +1291,7 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
}
// set client charset of the connection
$charset = $GLOBALS['egw']->translation->charset();
switch($server['db_type'])
switch($type)
{
case 'mysql':
if (isset($egw_db->Link_ID->charset2mysql[$charset])) $charset = $egw_db->Link_ID->charset2mysql[$charset];