mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: FulltextSearchable::enable() needs to replace the static on the decorated class iff the database engine is for MySQL
This commit is contained in:
parent
f976af78be
commit
25602811f2
@ -49,6 +49,9 @@ class FulltextSearchable extends DataExtension {
|
|||||||
if(!class_exists($class)) continue;
|
if(!class_exists($class)) continue;
|
||||||
|
|
||||||
if(isset($defaultColumns[$class])) {
|
if(isset($defaultColumns[$class])) {
|
||||||
|
if(DB::getConn()->getDatabaseServer() == 'mysql') {
|
||||||
|
Object::add_static_var($class, 'create_table_options', array('MySQLDatabase' => 'ENGINE=MyISAM'), true);
|
||||||
|
}
|
||||||
Object::add_extension($class, "FulltextSearchable('{$defaultColumns[$class]}')");
|
Object::add_extension($class, "FulltextSearchable('{$defaultColumns[$class]}')");
|
||||||
} else {
|
} else {
|
||||||
throw new Exception("FulltextSearchable::enable() I don't know the default search columns for class '$class'");
|
throw new Exception("FulltextSearchable::enable() I don't know the default search columns for class '$class'");
|
||||||
|
Loading…
Reference in New Issue
Block a user