mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
- 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user