- PWG_CHARSET, DB_CHARSET and DB_COLLATE... utf-8 ready

git-svn-id: http://piwigo.org/svn/trunk@2127 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices
2007-10-09 01:43:29 +00:00
parent 98b07a4a7f
commit e9becfa669
11 changed files with 617 additions and 62 deletions
+17
View File
@@ -144,6 +144,23 @@ or die ( "Could not connect to database server" );
mysql_select_db( $cfgBase )
or die ( "Could not connect to database" );
defined('PWG_CHARSET') and defined('DB_CHARSET')
or die('PWG_CHARSET and/or DB_CHARSET is not defined');
if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') )
{
if (DB_CHARSET!='')
{
pwg_query('SET NAMES "'.DB_CHARSET.'"');
}
}
else
{
if ( strtolower(PWG_CHARSET)!='iso-8859-1' )
{
die('PWG supports only iso-8859-1 charset on MySql version '.mysql_get_server_info());
}
}
//
// Setup gallery wide options, if this fails then we output a CRITICAL_ERROR
// since basic gallery information is not available