X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ftext.php;h=b57016456a8c366485035527f635a81906059d6b;hb=a25910db84af18ea8e465d3bc3b7feca39a4bfd0;hp=50e2e81931724a2e29f1c7ce5bb7404a8f8fa488;hpb=c2e17cb9c4590fc253bfa2abacb4c7bf80f319ce;p=friendica.git diff --git a/include/text.php b/include/text.php index 50e2e81931..b57016456a 100644 --- a/include/text.php +++ b/include/text.php @@ -12,7 +12,7 @@ if(! function_exists('replace_macros')) { * This is our template processor * * @param string|FriendicaSmarty $s the string requiring macro substitution, - * or an instance of FriendicaSmarty + * or an instance of FriendicaSmarty * @param array $r key value pairs (search => replace) * @return string substituted string */ @@ -770,7 +770,8 @@ function activity_match($haystack,$needle) { /** - * Pull out all #hashtags and @person tags from $string; + * @brief Pull out all #hashtags and @person tags from $string. + * * We also get @person@domain.com - which would make * the regex quite complicated as tags can also * end a sentence. So we'll run through our results @@ -873,8 +874,8 @@ function contact_block() { if((! is_array($a->profile)) || ($a->profile['hide-friends'])) return $o; $r = q("SELECT COUNT(*) AS `total` FROM `contact` - WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 and `pending` = 0 - AND `hidden` = 0 AND `archive` = 0 + WHERE `uid` = %d AND NOT `self` AND NOT `blocked` + AND NOT `hidden` AND NOT `archive` AND `network` IN ('%s', '%s', '%s')", intval($a->profile['uid']), dbesc(NETWORK_DFRN), @@ -891,7 +892,7 @@ function contact_block() { } else { // Splitting the query in two parts makes it much faster $r = q("SELECT `id` FROM `contact` - WHERE `uid` = %d AND NOT `self` AND NOT `blocked` AND NOT `pending` + WHERE `uid` = %d AND NOT `self` AND NOT `blocked` AND NOT `hidden` AND NOT `archive` AND `network` IN ('%s', '%s', '%s') ORDER BY RAND() LIMIT %d", intval($a->profile['uid']),