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
This commit is contained in:
parent
40ca013e42
commit
01c792a789
@ -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;
|
||||
|
||||
|
||||
/***************************************************
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user