diff options
author | Friendika <info@friendika.com> | 2011-10-27 19:12:30 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-10-27 19:12:30 -0700 |
commit | e5a7b3e24b5eccf31be7ef5b78580b599a94952f (patch) | |
tree | 190e705b539c698fdcb5a198c48e0cc6172b16d7 /mod/search.php | |
parent | 056fe0a3aabecdc3a236ce9350e4e6f54ef52758 (diff) | |
download | volse-hubzilla-e5a7b3e24b5eccf31be7ef5b78580b599a94952f.tar.gz volse-hubzilla-e5a7b3e24b5eccf31be7ef5b78580b599a94952f.tar.bz2 volse-hubzilla-e5a7b3e24b5eccf31be7ef5b78580b599a94952f.zip |
add contact-id to auto-complete response to resolve duplicates
Diffstat (limited to 'mod/search.php')
-rw-r--r-- | mod/search.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mod/search.php b/mod/search.php index e2c365fd3..819100204 100644 --- a/mod/search.php +++ b/mod/search.php @@ -96,10 +96,11 @@ function search_content(&$a) { // Only public wall posts can be shown // OR your own posts if you are a logged in member + $escaped_search = str_replace(array('[',']'),array('\\[','\\]'),$search); // $s_bool = sprintf("AND MATCH (`item`.`body`) AGAINST ( '%s' IN BOOLEAN MODE )", dbesc($search)); $s_regx = sprintf("AND ( `item`.`body` REGEXP '%s' OR `item`.`tag` REGEXP '%s' )", - dbesc($search), dbesc('\\]' . $search . '\\[')); + dbesc($escaped_search), dbesc('\\]' . $escaped_search . '\\[')); // if(mb_strlen($search) >= 3) // $search_alg = $s_bool; |