Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

API CHANGE Changed MySQLFulltextSearchable class to FulltextSearchabl…

…e (applies to all databases) (from r102012)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112056 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
commit 368033942cb3323655b92f1630361900aab6959b 1 parent e8e7065
@sminnee sminnee authored
View
6 search/MySQLFulltextSearchable.php → search/FulltextSearchable.php
@@ -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 @@ static function enable($searchableClasses = array('SiteTree', 'File')) {
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
4 tests/search/SearchFormTest.php
@@ -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
4 tests/search/TranslatableSearchFormTest.php
@@ -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",
Please sign in to comment.
Something went wrong with that request. Please try again.