Merge branch 'fix/db_connect_charset' into 'develop'
removed default charset, set to auto See merge request artica/pandorafms!1973
This commit is contained in:
commit
0c019d1baf
|
@ -14,7 +14,7 @@
|
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
function mysql_connect_db($host = null, $db = null, $user = null, $pass = null, $port = null, $charset = "utf8") {
|
||||
function mysql_connect_db($host = null, $db = null, $user = null, $pass = null, $port = null, $charset = null) {
|
||||
global $config;
|
||||
|
||||
if ($host === null)
|
||||
|
@ -42,7 +42,9 @@ function mysql_connect_db($host = null, $db = null, $user = null, $pass = null,
|
|||
}
|
||||
db_change_cache_id ($db, $host);
|
||||
|
||||
mysqli_set_charset($connect_id, $charset);
|
||||
if (isset($charset)) {
|
||||
mysqli_set_charset($connect_id, $charset);
|
||||
}
|
||||
|
||||
mysqli_select_db($connect_id, $db);
|
||||
}
|
||||
|
@ -54,7 +56,9 @@ function mysql_connect_db($host = null, $db = null, $user = null, $pass = null,
|
|||
|
||||
db_change_cache_id ($db, $host);
|
||||
|
||||
@mysql_set_charset($connect_id, $charset);
|
||||
if (isset($charset)) {
|
||||
@mysql_set_charset($connect_id, $charset);
|
||||
}
|
||||
|
||||
mysql_select_db($db, $connect_id);
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ function db_select_engine() {
|
|||
}
|
||||
}
|
||||
|
||||
function db_connect($host = null, $db = null, $user = null, $pass = null, $port = null, $critical = true, $charset = "utf8") {
|
||||
function db_connect($host = null, $db = null, $user = null, $pass = null, $port = null, $critical = true, $charset = null) {
|
||||
global $config;
|
||||
static $error = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue