]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Contact.php
The priority is now a class constant
[friendica.git] / src / Module / Contact.php
index 05c4e05081254dce75fa3cb78a4c5748a6b0deab..4f565a87176d7448a2ae9e9f32207ceea1bf1cbf 100644 (file)
@@ -126,9 +126,9 @@ class Contact extends BaseModule
                        }
 
                        // pull feed and consume it, which should subscribe to the hub.
-                       Worker::add(PRIORITY_HIGH, 'OnePoll', $contact_id, 'force');
+                       Worker::add(Worker::PRIORITY_HIGH, 'OnePoll', $contact_id, 'force');
                } else {
-                       Worker::add(PRIORITY_HIGH, 'UpdateContact', $contact_id);
+                       Worker::add(Worker::PRIORITY_HIGH, 'UpdateContact', $contact_id);
                }
        }
 
@@ -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;