Keep the charset stable, only setting it at install time

This commit is contained in:
Kijin Sung 2016-01-11 11:45:02 +09:00
parent d9a9cfe21b
commit 2409448cec
3 changed files with 13 additions and 34 deletions

View file

@ -45,15 +45,8 @@ class DBMysqli extends DBMysql
$this->setError($error, mysqli_connect_error());
return;
}
if(isset($connection["db_charset"]))
{
$charset = $this->charset = $connection["db_charset"];
}
else
{
$charset = 'utf8';
}
mysqli_set_charset($result, $charset);
$this->charset = isset($connection["db_charset"]) ? $connection["db_charset"] : 'utf8';
mysqli_set_charset($result, $this->charset);
return $result;
}