aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-02-09 14:08:29 -0800
committerzotlabs <mike@macgirvin.com>2018-02-09 14:08:29 -0800
commit5a9ea29614b8620c10d84f67a1a7c93fe537a037 (patch)
treee46c60cb9b175b5efb5e9d1dd48935f3c0e91c26
parent3dfafb710c901cd78b75681e39156a9f018b1ac9 (diff)
downloadvolse-hubzilla-5a9ea29614b8620c10d84f67a1a7c93fe537a037.tar.gz
volse-hubzilla-5a9ea29614b8620c10d84f67a1a7c93fe537a037.tar.bz2
volse-hubzilla-5a9ea29614b8620c10d84f67a1a7c93fe537a037.zip
hubzilla issue #975 (searching for title as well as body could present a performance issue, so perhaps the tradeoffs should be debated)
-rw-r--r--Zotlabs/Module/Search.php2
1 files changed, 1 insertions, 1 deletions
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...