]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Contact.php
Add new frio.always_open_compose setting
[friendica.git] / src / Module / Contact.php
index 05c4e05081254dce75fa3cb78a4c5748a6b0deab..9c073b3ef1a892a15b06951eb0fb58107a5338e5 100644 (file)
@@ -246,8 +246,10 @@ class Contact extends BaseModule
                if ($search) {
                        $searching = true;
                        $search_hdr = $search;
-                       $search_txt = preg_quote($search);
-                       $sql_extra .= " AND (name REGEXP ? OR url REGEXP ? OR nick REGEXP ?)";
+                       $search_txt = preg_quote(trim($search, ' @!'));
+                       $sql_extra .= " AND (`name` REGEXP ? OR `url` REGEXP ? OR `nick` REGEXP ? OR `addr` REGEXP ? OR `alias` REGEXP ?)";
+                       $sql_values[] = $search_txt;
+                       $sql_values[] = $search_txt;
                        $sql_values[] = $search_txt;
                        $sql_values[] = $search_txt;
                        $sql_values[] = $search_txt;