diff options
author | friendica <info@friendica.com> | 2012-06-20 16:05:46 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-06-20 16:05:46 -0700 |
commit | 0f0e5be549e4bea3086f59614ad5eb3458f2e53f (patch) | |
tree | 15957956d0bdf3f5ce72dbcbc12efbed2daae1b9 /mod/contacts.php | |
parent | 0d0f129d045e7a25d750c9eb2995d488678986e5 (diff) | |
download | volse-hubzilla-0f0e5be549e4bea3086f59614ad5eb3458f2e53f.tar.gz volse-hubzilla-0f0e5be549e4bea3086f59614ad5eb3458f2e53f.tar.bz2 volse-hubzilla-0f0e5be549e4bea3086f59614ad5eb3458f2e53f.zip |
contact search oddities
Diffstat (limited to 'mod/contacts.php')
-rw-r--r-- | mod/contacts.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mod/contacts.php b/mod/contacts.php index f84a988c8..1463af903 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -479,12 +479,13 @@ function contacts_content(&$a) { - + $searching = false; if($search) { $search_hdr = $search; - $search = dbesc($search.'*'); + $search = dbesc(protect_sprintf('%' . $search . '%'); + $searching = true; } - $sql_extra .= ((strlen($search)) ? " AND MATCH `name` AGAINST ('$search' IN BOOLEAN MODE) " : ""); + $sql_extra .= (($searching) ? " AND `name` REGEXP '$search' " : ""); if($nets) $sql_extra .= sprintf(" AND network = '%s' ", dbesc($nets)); |