[geeklog-cvs] geeklog: Use mysql_set_charset when possible (skips the check fo...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Tue Jun 14 06:13:22 EDT 2011
changeset 8316:8ec8b7d5885e
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/8ec8b7d5885e
user: Dirk Haun <dirk at haun-online.de>
date: Mon Jun 13 18:42:39 2011 +0200
description:
Use mysql_set_charset when possible (skips the check for MySQL 4.1 in the "else" case, since that is now the min. requirement)
diffstat:
system/databases/mysql.class.php | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (17 lines):
diff -r 1b18e6866b33 -r 8ec8b7d5885e system/databases/mysql.class.php
--- a/system/databases/mysql.class.php Mon Jun 13 18:28:50 2011 +0200
+++ b/system/databases/mysql.class.php Mon Jun 13 18:42:39 2011 +0200
@@ -137,8 +137,11 @@
$this->dbError();
}
- if ($this->_mysql_version >= 40100) {
- if ($this->_charset == 'utf-8') {
+ if ($this->_charset == 'utf-8') {
+ if (($this->_mysql_version >= 50007) &&
+ function_exists('mysql_set_charset')) {
+ @mysql_set_charset('utf-8', $this->_db);
+ } else {
@mysql_query ("SET NAMES 'utf8'", $this->_db);
}
}
More information about the geeklog-cvs
mailing list