X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fsearch.php;h=7d588aa4d15693c12b16dad0bf61006d697223fb;hb=5b7c8d86311b847c2a4a89c465ae1c510a58be7b;hp=3a253762689693dfcdc2aea6876bf2fffa08beb6;hpb=35973b9273df73b92b840634ff021deb501e4221;p=friendica.git diff --git a/mod/search.php b/mod/search.php index 3a25376268..7d588aa4d1 100644 --- a/mod/search.php +++ b/mod/search.php @@ -17,7 +17,7 @@ function search_saved_searches() { if (dbm::is_result($r)) { $saved = array(); - foreach($r as $rr) { + foreach ($r as $rr) { $saved[] = array( 'id' => $rr['id'], 'term' => $rr['term'], @@ -43,7 +43,7 @@ function search_saved_searches() { } -function search_init(App &$a) { +function search_init(App $a) { $search = ((x($_GET,'search')) ? notags(trim(rawurldecode($_GET['search']))) : ''); @@ -81,13 +81,13 @@ function search_init(App &$a) { -function search_post(App &$a) { +function search_post(App $a) { if(x($_POST,'search')) $a->data['search'] = $_POST['search']; } -function search_content(App &$a) { +function search_content(App $a) { if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { notice( t('Public access denied.') . EOL); @@ -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