diff options
Diffstat (limited to 'include/dblayer/functions_mysqli.inc.php')
-rw-r--r-- | include/dblayer/functions_mysqli.inc.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/dblayer/functions_mysqli.inc.php b/include/dblayer/functions_mysqli.inc.php index 390cf2e06..5b40cfe5b 100644 --- a/include/dblayer/functions_mysqli.inc.php +++ b/include/dblayer/functions_mysqli.inc.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+ // | Piwigo - a PHP based photo gallery | // +-----------------------------------------------------------------------+ -// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org | +// | Copyright(C) 2008-2016 Piwigo Team http://piwigo.org | // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | // +-----------------------------------------------------------------------+ @@ -80,12 +80,14 @@ function pwg_db_connect($host, $user, $password, $database) */ function pwg_db_check_charset() { + global $mysqli; + $db_charset = 'utf8'; if (defined('DB_CHARSET') and DB_CHARSET != '') { $db_charset = DB_CHARSET; } - pwg_query('SET NAMES "'.$db_charset.'"'); + $mysqli->set_charset($db_charset); } /** @@ -901,4 +903,4 @@ function query2array($query, $key_name=null, $value_name=null) return $data; } -?>
\ No newline at end of file +?> |