hubzilla issue #975 (searching for title as well as body could present a performance issue, so perhaps the tradeoffs should be debated)

This commit is contained in:
zotlabs 2018-02-09 14:08:29 -08:00
parent 3dfafb710c
commit 5a9ea29614

View File

@ -90,7 +90,7 @@ class Search extends \Zotlabs\Web\Controller {
}
else {
$regstr = db_getfunc('REGEXP');
$sql_extra = sprintf(" AND item.body $regstr '%s' ", dbesc(protect_sprintf(preg_quote($search))));
$sql_extra = sprintf(" AND (item.title $regstr '%s' OR item.body $regstr '%s') ", dbesc(protect_sprintf(preg_quote($search))), dbesc(protect_sprintf(preg_quote($search))));
}
// Here is the way permissions work in the search module...