From 01c792a78969dcfa3e9dd99a4491ccb6836ca8c1 Mon Sep 17 00:00:00 2001 From: cweiske Date: Sat, 20 Feb 2010 11:23:07 +0000 Subject: new config option to disable "SET NAMES UTF8" sql call git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@671 b3834d28-1941-0410-a4f8-b48e95affb8f --- src/SemanticScuttle/Service/Factory.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/SemanticScuttle/Service/Factory.php') 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; } -- cgit v1.2.3