summaryrefslogtreecommitdiff
path: root/src/SemanticScuttle
diff options
context:
space:
mode:
Diffstat (limited to 'src/SemanticScuttle')
-rw-r--r--src/SemanticScuttle/Service/Factory.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/SemanticScuttle/Service/Factory.php b/src/SemanticScuttle/Service/Factory.php
index 9b79e6c..d7ff1d4 100644
--- a/src/SemanticScuttle/Service/Factory.php
+++ b/src/SemanticScuttle/Service/Factory.php
@@ -113,7 +113,7 @@ class SemanticScuttle_Service_Factory
protected static function loadDb()
{
global $dbhost, $dbuser, $dbpass, $dbname,
- $dbport, $dbpersist, $dbtype;
+ $dbport, $dbpersist, $dbtype, $dbneedssetnames;
if (self::$db !== null) {
return;
@@ -130,7 +130,9 @@ class SemanticScuttle_Service_Factory
self::$db
);
}
- $db->sql_query('SET NAMES UTF8');
+
+ $dbneedssetnames && $db->sql_query('SET NAMES UTF8');
+
self::$db = $db;
}