aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/search/fulltext_native.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-08-15 20:00:47 -0400
committerNils Adermann <naderman@naderman.de>2011-09-29 15:42:40 +0200
commitdcc5ca53778184f0719b9ac0c221688ad03bd57e (patch)
treeab61c555eecd1f38d92bfd103d23dbec3b940d87 /phpBB/includes/search/fulltext_native.php
parentfb943d4d6b39cea9825aab78e397eefe26cf7bdf (diff)
downloadforums-dcc5ca53778184f0719b9ac0c221688ad03bd57e.tar
forums-dcc5ca53778184f0719b9ac0c221688ad03bd57e.tar.gz
forums-dcc5ca53778184f0719b9ac0c221688ad03bd57e.tar.bz2
forums-dcc5ca53778184f0719b9ac0c221688ad03bd57e.tar.xz
forums-dcc5ca53778184f0719b9ac0c221688ad03bd57e.zip
[feature/extension-manager] Make search backends loadable from extensions
Search backends are now required to be autoloadable. The database updater to 3.1 tries to guess the class name as phpbb_search_<oldname> which works for the default backends we ship. PHPBB3-10323
Diffstat (limited to 'phpBB/includes/search/fulltext_native.php')
-rw-r--r--phpBB/includes/search/fulltext_native.php17
1 files changed, 7 insertions, 10 deletions
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php
index e749e86f68..7c792bba24 100644
--- a/phpBB/includes/search/fulltext_native.php
+++ b/phpBB/includes/search/fulltext_native.php
@@ -17,16 +17,11 @@ if (!defined('IN_PHPBB'))
}
/**
-* @ignore
-*/
-include_once($phpbb_root_path . 'includes/search/search.' . $phpEx);
-
-/**
* fulltext_native
* phpBB's own db driven fulltext search, version 2
* @package search
*/
-class fulltext_native extends search_backend
+class phpbb_search_fulltext_native extends phpbb_search_base
{
var $stats = array();
var $word_length = array();
@@ -41,10 +36,8 @@ class fulltext_native extends search_backend
* Initialises the fulltext_native search backend with min/max word length and makes sure the UTF-8 normalizer is loaded.
*
* @param boolean|string &$error is passed by reference and should either be set to false on success or an error message on failure.
- *
- * @access public
*/
- function fulltext_native(&$error)
+ public function __construct(&$error)
{
global $phpbb_root_path, $phpEx, $config;
@@ -58,10 +51,14 @@ class fulltext_native extends search_backend
include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
}
-
$error = false;
}
+ function get_name()
+ {
+ return 'phpBB Native Fulltext';
+ }
+
/**
* This function fills $this->search_query with the cleaned user search query.
*