summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-05-27 14:57:45 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-05-27 14:57:45 -0400
commitd068680e1913a32eba0f5b0e1e746ac66ec638d3 (patch)
tree10ed4b25cdee14cc1449e13e2b39e7ec88544d8e /classes
parentb3bb8943f592de9f6936f35be49a88c641bf6da1 (diff)
optionally use SET NAMES for utf8 to DB
Diffstat (limited to 'classes')
-rw-r--r--classes/Memcached_DataObject.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php
index 877bbf2e0..52ad4100f 100644
--- a/classes/Memcached_DataObject.php
+++ b/classes/Memcached_DataObject.php
@@ -239,7 +239,9 @@ class Memcached_DataObject extends DB_DataObject
$result = parent::_connect();
if (!$exists) {
$DB = &$_DB_DATAOBJECT['CONNECTIONS'][$this->_database_dsn_md5];
- $DB->query('SET NAMES "utf8"');
+ if (common_config('db', 'utf8')) {
+ $DB->query('SET NAMES "utf8"');
+ }
}
return $result;
}