From cec79ddf2bb9dc01c70dbad97b3efedaf9ecb139 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 21 Feb 2017 05:23:37 +0000 Subject: [PATCH] See issue 3157: Fulltext is now disabled --- mod/network.php | 7 ++++--- mod/search.php | 9 +++++---- view/templates/admin_site.tpl | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/mod/network.php b/mod/network.php index ad0347ba0..23cf098b6 100644 --- a/mod/network.php +++ b/mod/network.php @@ -574,9 +574,10 @@ function network_content(App $a, $update = 0) { $sql_order = "`item`.`id`"; $order_mode = "id"; } else { - if (get_config('system','use_fulltext_engine')) - $sql_extra = sprintf(" AND MATCH (`item`.`body`, `item`.`title`) AGAINST ('%s' in boolean mode) ", dbesc(protect_sprintf($search))); - else + // Disabled until final decision what to do with this + //if (get_config('system','use_fulltext_engine')) + // $sql_extra = sprintf(" AND MATCH (`item`.`body`, `item`.`title`) AGAINST ('%s' in boolean mode) ", dbesc(protect_sprintf($search))); + //else $sql_extra = sprintf(" AND `item`.`body` REGEXP '%s' ", dbesc(protect_sprintf(preg_quote($search)))); $sql_order = "`item`.`id`"; $order_mode = "id"; diff --git a/mod/search.php b/mod/search.php index df604e367..7d588aa4d 100644 --- a/mod/search.php +++ b/mod/search.php @@ -203,11 +203,12 @@ function search_content(App $a) { } else { logger("Start fulltext search for '".$search."'", LOGGER_DEBUG); - if (get_config('system','use_fulltext_engine')) { - $sql_extra = sprintf(" AND MATCH (`item`.`body`, `item`.`title`) AGAINST ('%s' in boolean mode) ", dbesc(protect_sprintf($search))); - } else { + // Disabled until finally is decided how to proceed with this + //if (get_config('system','use_fulltext_engine')) { + // $sql_extra = sprintf(" AND MATCH (`item`.`body`, `item`.`title`) AGAINST ('%s' in boolean mode) ", dbesc(protect_sprintf($search))); + //} else { $sql_extra = sprintf(" AND `item`.`body` REGEXP '%s' ", dbesc(protect_sprintf(preg_quote($search)))); - } + //} $r = q("SELECT %s FROM `item` %s diff --git a/view/templates/admin_site.tpl b/view/templates/admin_site.tpl index 531614932..2edfddb88 100644 --- a/view/templates/admin_site.tpl +++ b/view/templates/admin_site.tpl @@ -147,7 +147,7 @@

{{$performance}}

- {{include file="field_checkbox.tpl" field=$use_fulltext_engine}} + {{include file="field_checkbox.tpl" field=$only_tag_search}} {{include file="field_input.tpl" field=$itemcache}} {{include file="field_input.tpl" field=$itemcache_duration}}