summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatar cweiske2010-02-20 11:23:07 +0000
committerGravatar cweiske2010-02-20 11:23:07 +0000
commit01c792a78969dcfa3e9dd99a4491ccb6836ca8c1 (patch)
tree0454f255450da6b24ce0b6d91a388705247e32e2
parent40ca013e42ff64f5c88e31077e9e816cc3b7e581 (diff)
downloadscuttle-01c792a78969dcfa3e9dd99a4491ccb6836ca8c1.tar.gz
scuttle-01c792a78969dcfa3e9dd99a4491ccb6836ca8c1.zip
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
-rw-r--r--data/config.default.php9
-rw-r--r--doc/ChangeLog7
-rw-r--r--src/SemanticScuttle/Service/Factory.php6
3 files changed, 20 insertions, 2 deletions
diff --git a/data/config.default.php b/data/config.default.php
index 1b040c0..fdbdaee 100644
--- a/data/config.default.php
+++ b/data/config.default.php
@@ -180,6 +180,15 @@ $dbname = 'scuttle';
*/
$tableprefix = 'sc_';
+/*
+ * If the database needs to be switched to UTF8
+ * manually or not. If true, a "SET NAMES UTF8" query
+ * will be sent at the beginning. If you need performance,
+ * save this query and set it in your mysql server options.
+ *
+ * @var boolean
+ */
+$dbneedssetnames = true;
/***************************************************
diff --git a/doc/ChangeLog b/doc/ChangeLog
index c797f56..05757ac 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,10 +1,17 @@
ChangeLog for SemantiScuttle
============================
+0.97.0 - 2010-?????
+-------------------
+- Many SQL optimizations
+- New config option to skip "SET NAMES UTF8" call: $dbneedssetnames
+
+
0.96.1 - 2010-02-09
-------------------
- Fix bug #2948410: API is broken in 0.96.0
+
0.96.0 - 2010-02-08
-------------------
- Fix bug #2843523: ArtViper thumbnail license change
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;
}