]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #4165 livesearch now returns people based on last names
authorcash <cash.costello@gmail.com>
Fri, 22 Jun 2012 00:00:52 +0000 (20:00 -0400)
committercash <cash.costello@gmail.com>
Fri, 22 Jun 2012 00:00:52 +0000 (20:00 -0400)
engine/lib/input.php

index dda8211b6c3a6f9e9a2ba51c09f5b0ff73736f44..6d1646e1a17ed4031b51a5145331f9dde0c56049 100644 (file)
@@ -283,7 +283,7 @@ function input_livesearch_page_handler($page) {
                                        WHERE e.guid = ue.guid
                                                AND e.enabled = 'yes'
                                                AND ue.banned = 'no'
-                                               AND (ue.name LIKE '$q%' OR ue.username LIKE '$q%')
+                                               AND (ue.name LIKE '$q%' OR ue.name LIKE '% $q%' OR ue.username LIKE '$q%')
                                        LIMIT $limit
                                ";
 
@@ -333,7 +333,7 @@ function input_livesearch_page_handler($page) {
                                        WHERE e.guid = ge.guid
                                                AND e.enabled = 'yes'
                                                $owner_where
-                                               AND (ge.name LIKE '$q%' OR ge.description LIKE '%$q%')
+                                               AND (ge.name LIKE '$q%' OR ge.name LIKE '% $q%' OR ge.description LIKE '% $q%')
                                        LIMIT $limit
                                ";
                                if ($entities = get_data($query)) {
@@ -379,7 +379,7 @@ function input_livesearch_page_handler($page) {
                                                AND e.guid = ue.guid
                                                AND e.enabled = 'yes'
                                                AND ue.banned = 'no'
-                                               AND (ue.name LIKE '$q%' OR ue.username LIKE '$q%')
+                                               AND (ue.name LIKE '$q%' OR ue.name LIKE '% $q%' OR ue.username LIKE '$q%')
                                        LIMIT $limit
                                ";