diff options
author | Dhruv Goel <dhruv.goel92@gmail.com> | 2012-05-01 16:09:08 +0530 |
---|---|---|
committer | Dhruv Goel <dhruv.goel92@gmail.com> | 2012-07-05 21:11:20 +0530 |
commit | 9f4219b1c7e74f86134b51fa637b513c5a670b5f (patch) | |
tree | 2294a976b94ba4b7b539a18261ab467e882d54bd | |
parent | 98bc7fa6ce8dff493bdf0e09e1d09bc27eb31a6e (diff) | |
download | forums-9f4219b1c7e74f86134b51fa637b513c5a670b5f.tar forums-9f4219b1c7e74f86134b51fa637b513c5a670b5f.tar.gz forums-9f4219b1c7e74f86134b51fa637b513c5a670b5f.tar.bz2 forums-9f4219b1c7e74f86134b51fa637b513c5a670b5f.tar.xz forums-9f4219b1c7e74f86134b51fa637b513c5a670b5f.zip |
[feature/postgresql-fulltext-search] minor changes
Some changes in code to get it work against current develop.
PosgreSQL Fulltext search works for new install now.
PHPBB3-9730
-rw-r--r-- | phpBB/includes/search/fulltext_postgres.php | 18 | ||||
-rw-r--r-- | phpBB/install/schemas/fulltext_postgres.sql | 3 | ||||
-rw-r--r-- | phpBB/install/schemas/schema_data.sql | 3 |
3 files changed, 15 insertions, 9 deletions
diff --git a/phpBB/includes/search/fulltext_postgres.php b/phpBB/includes/search/fulltext_postgres.php index 18a5b402bf..6b95a4ff67 100644 --- a/phpBB/includes/search/fulltext_postgres.php +++ b/phpBB/includes/search/fulltext_postgres.php @@ -9,6 +9,7 @@ */ /** +* @ignore */ if (!defined('IN_PHPBB')) { @@ -16,16 +17,11 @@ if (!defined('IN_PHPBB')) } /** -* @ignore -*/ -include_once($phpbb_root_path . 'includes/search/search.' . $phpEx); - -/** * fulltext_postgres * Fulltext search for PostgreSQL * @package search */ -class fulltext_postgres extends search_backend +class phpbb_search_fulltext_postgres extends phpbb_search_base { var $stats = array(); var $word_length = array(); @@ -76,6 +72,16 @@ class fulltext_postgres extends search_backend } /** + * Returns the name of this search backend to be displayed to administrators + * + * @return string Name + */ + function get_name() + { + return 'PostgreSQL Fulltext'; + } + + /** * Checks for correct PostgreSQL version and stores min/max word length in the config */ function init() diff --git a/phpBB/install/schemas/fulltext_postgres.sql b/phpBB/install/schemas/fulltext_postgres.sql deleted file mode 100644 index 0be6648d0c..0000000000 --- a/phpBB/install/schemas/fulltext_postgres.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_postgres_max_word_len', '254'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_postgres_min_word_len', '4'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_postgres_ts_name', 'default'); diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 2ea5eca768..fa6cff1bbd 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -124,6 +124,9 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_co INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_load_upd', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_max_chars', '14'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_min_chars', '3'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_postgres_max_word_len', '254'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_postgres_min_word_len', '4'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_postgres_ts_name', 'simple'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('hot_threshold', '25'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('icons_path', 'images/icons'); |