API CHANGE Changed MySQLFulltextSearchable class to FulltextSearchable (applies to all databases)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@102012 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-04-01 00:56:13 +00:00 committed by Sam Minnee
parent 09353a2b6c
commit 67c4a33e17
3 changed files with 7 additions and 7 deletions

View File

@ -3,7 +3,7 @@
/**
* Provides a simple search engine for your site based on the MySQL FULLTEXT index
*/
class MySQLFulltextSearchable extends DataObjectDecorator {
class FulltextSearchable extends DataObjectDecorator {
protected $searchFields;
/**
@ -18,9 +18,9 @@ class MySQLFulltextSearchable extends DataObjectDecorator {
if(!is_array($searchableClasses)) $searchableClasses = array($searchableClasses);
foreach($searchableClasses as $class) {
if(isset($defaultColumns[$class])) {
Object::add_extension($class, "MySQLFulltextSearchable('{$defaultColumns[$class]}')");
Object::add_extension($class, "FulltextSearchable('{$defaultColumns[$class]}')");
} else {
throw new Exception("MySQLFUlltextSearchable::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'");
}
}

View File

@ -14,10 +14,10 @@ class SearchFormTest extends FunctionalTest {
protected $requiredExtensions = array(
"SiteTree" => array(
"MySQLFulltextSearchable('Title,MenuTitle,Content,MetaTitle,MetaDescription,MetaKeywords')",
"FulltextSearchable('Title,MenuTitle,Content,MetaTitle,MetaDescription,MetaKeywords')",
),
"File" => array(
"MySQLFulltextSearchable('Filename,Title,Content')",
"FulltextSearchable('Filename,Title,Content')",
),
"ContentController" => array(
"ContentControllerSearchExtension",

View File

@ -12,10 +12,10 @@ class TranslatableSearchFormTest extends FunctionalTest {
protected $requiredExtensions = array(
'SiteTree' => array(
'Translatable',
"MySQLFulltextSearchable('Title,MenuTitle,Content,MetaTitle,MetaDescription,MetaKeywords')",
"FulltextSearchable('Title,MenuTitle,Content,MetaTitle,MetaDescription,MetaKeywords')",
),
"File" => array(
"MySQLFulltextSearchable('Filename,Title,Content')",
"FulltextSearchable('Filename,Title,Content')",
),
"ContentController" => array(
"ContentControllerSearchExtension",