X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2FDirSearch.php;h=596860823652bd09af7b18ad648b9e69582473b1;hb=cb3077b7a9023a65b6dc13df065bfbbe7f7633fb;hp=99a0698d467edaf82b7026a0796c6a83114ea377;hpb=9ad7af699b47221e5721f60dc1f604723c65c829;p=friendica.git diff --git a/include/DirSearch.php b/include/DirSearch.php index 99a0698d46..5968608236 100644 --- a/include/DirSearch.php +++ b/include/DirSearch.php @@ -38,6 +38,8 @@ class DirSearch { else $extra_sql = ""; + $search .= "%"; + $results = q("SELECT `contact`.`id` AS `cid`, `gcontact`.`url`, `gcontact`.`name`, `gcontact`.`nick`, `gcontact`.`photo`, `gcontact`.`network`, `gcontact`.`keywords`, `gcontact`.`addr`, `gcontact`.`community` FROM `gcontact` @@ -46,10 +48,10 @@ class DirSearch { AND NOT `contact`.`pending` AND `contact`.`rel` IN ('%s', '%s') WHERE (`contact`.`id` > 0 OR (NOT `gcontact`.`hide` AND `gcontact`.`network` IN ('%s', '%s', '%s') AND ((`gcontact`.`last_contact` >= `gcontact`.`last_failure`) OR (`gcontact`.`updated` >= `gcontact`.`last_failure`)))) AND - (`gcontact`.`addr` REGEXP '%s' OR `gcontact`.`name` REGEXP '%s' OR `gcontact`.`nick` REGEXP '%s') $extra_sql + (`gcontact`.`addr` LIKE '%s' OR `gcontact`.`name` LIKE '%s' OR `gcontact`.`nick` LIKE '%s') $extra_sql GROUP BY `gcontact`.`nurl` ORDER BY `gcontact`.`nurl` DESC - LIMIT 40", + LIMIT 1000", intval(local_user()), dbesc(CONTACT_IS_SHARING), dbesc(CONTACT_IS_FRIEND), dbesc(NETWORK_DFRN), dbesc($ostatus), dbesc($diaspora), dbesc(escape_tags($search)), dbesc(escape_tags($search)), dbesc(escape_tags($search)));