aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/contacts.php7
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));