mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-06-29 07:59:31 +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(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]}')");
|
||||
} else {
|
||||
throw new Exception("FulltextSearchable::enable() I don't know the default search columns for class '$class'");
|
||||
|
|
Loading…
Reference in New Issue
Block a user