]> git.mxchange.org Git - friendica.git/commitdiff
Issue 3157: No fulltext anymore
authorMichael <heluecht@pirati.ca>
Tue, 18 Apr 2017 20:09:05 +0000 (20:09 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 18 Apr 2017 20:09:05 +0000 (20:09 +0000)
mod/admin.php
mod/network.php
mod/search.php
view/templates/admin_site.tpl
view/theme/frost/templates/admin_site.tpl

index fe89faf4434d79649e1dba4a063518e297d11ef2..c57e7f3545d510bf0b6eccf73207491a7df51a1c 100644 (file)
@@ -653,7 +653,6 @@ function admin_page_site_post(App $a) {
        $force_ssl              =       ((x($_POST,'force_ssl'))                ? True                                          : False);
        $hide_help              =       ((x($_POST,'hide_help'))                ? True                                          : False);
        $suppress_tags          =       ((x($_POST,'suppress_tags'))            ? True                                          : False);
-       $use_fulltext_engine    =       ((x($_POST,'use_fulltext_engine'))      ? True                                          : False);
        $itemcache              =       ((x($_POST,'itemcache'))                ? notags(trim($_POST['itemcache']))             : '');
        $itemcache_duration     =       ((x($_POST,'itemcache_duration'))       ? intval($_POST['itemcache_duration'])          : 0);
        $max_comments           =       ((x($_POST,'max_comments'))             ? intval($_POST['max_comments'])                : 0);
@@ -802,7 +801,6 @@ function admin_page_site_post(App $a) {
 
        set_config('system', 'force_ssl', $force_ssl);
        set_config('system', 'hide_help', $hide_help);
-       set_config('system', 'use_fulltext_engine', $use_fulltext_engine);
        set_config('system', 'itemcache', $itemcache);
        set_config('system', 'itemcache_duration', $itemcache_duration);
        set_config('system', 'max_comments', $max_comments);
@@ -1031,7 +1029,6 @@ function admin_page_site(App $a) {
 
                '$nodeinfo'             => array('nodeinfo', t("Publish server information"), get_config('system','nodeinfo'), t("If enabled, general server and usage data will be published. The data contains the name and version of the server, number of users with public profiles, number of posts and the activated protocols and connectors. See <a href='http://the-federation.info/'>the-federation.info</a> for details.")),
 
-               '$use_fulltext_engine'  => array('use_fulltext_engine', t("Use MySQL full text engine"), get_config('system','use_fulltext_engine'), t("Activates the full text engine. Speeds up search - but can only search for four and more characters.")),
                '$suppress_tags'        => array('suppress_tags', t("Suppress Tags"), get_config('system','suppress_tags'), t("Suppress showing a list of hashtags at the end of the posting.")),
                '$itemcache'            => array('itemcache', t("Path to item cache"), get_config('system','itemcache'), t("The item caches buffers generated bbcode and external images.")),
                '$itemcache_duration'   => array('itemcache_duration', t("Cache duration in seconds"), get_config('system','itemcache_duration'), t("How long should the cache files be hold? Default value is 86400 seconds (One day). To disable the item cache, set the value to -1.")),
index 5e94429b5c8a5b35d3997df62c9edaf99cefebc1..db4bb91309d84b874850432c7461104c74ba62b6 100644 (file)
@@ -581,11 +581,7 @@ function network_content(App $a, $update = 0) {
                        $sql_order = "`item`.`id`";
                        $order_mode = "id";
                } 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_extra = sprintf(" AND `item`.`body` REGEXP '%s' ", dbesc(protect_sprintf(preg_quote($search))));
                        $sql_order = "`item`.`id`";
                        $order_mode = "id";
                }
index f274b2a8798f6139e16ac11af1aa440e5d164d83..a804ca32e0b2e80603a1c5a01ab08c050ae9806a 100644 (file)
@@ -203,12 +203,7 @@ function search_content(App $a) {
        } else {
                logger("Start fulltext search for '".$search."'", LOGGER_DEBUG);
 
-               // 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))));
-               //}
+               $sql_extra = sprintf(" AND `item`.`body` REGEXP '%s' ", dbesc(protect_sprintf(preg_quote($search))));
 
                $r = q("SELECT %s
                        FROM `item` %s
index 86efb26a22da73f4cef1adb0ca6828b383f31996..196bc479b5c5e330c9c4527d07589f195875c88b 100644 (file)
        <div class="submit"><input type="submit" name="page_site" value="{{$submit|escape:'html'}}" /></div>
 
        <h3>{{$performance}}</h3>
-       <!-- {{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}}
index 535242a3ecba1d35faee5b90dea9af71afcbf387..ab0b6af7375d4d3a3fd296b7ec9f1b413d13f231 100644 (file)
@@ -65,7 +65,6 @@
        {{include file="field_input.tpl" field=$basepath}}
 
        <h3>{{$performance}}</h3>
-       {{include file="field_checkbox.tpl" field=$use_fulltext_engine}}
        {{include file="field_input.tpl" field=$itemcache}}
        {{include file="field_input.tpl" field=$itemcache_duration}}