From 5a9ea29614b8620c10d84f67a1a7c93fe537a037 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 9 Feb 2018 14:08:29 -0800 Subject: hubzilla issue #975 (searching for title as well as body could present a performance issue, so perhaps the tradeoffs should be debated) --- Zotlabs/Module/Search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Module/Search.php') diff --git a/Zotlabs/Module/Search.php b/Zotlabs/Module/Search.php index 4d35b59f3..55e0e746f 100644 --- a/Zotlabs/Module/Search.php +++ b/Zotlabs/Module/Search.php @@ -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... -- cgit v1.2.3