X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ftext.php;h=fc5e79294f261bfbe1942b42a7daad69f46f3aeb;hb=d0ade828c05545e45ce129c05090fa795d0376c1;hp=3f4fe07d6981ae4c279547f0ce891fc13c50722e;hpb=c4ba035ee314295c5a6a62ed49554f09a50c86f4;p=friendica.git diff --git a/include/text.php b/include/text.php index 3f4fe07d69..fc5e79294f 100644 --- a/include/text.php +++ b/include/text.php @@ -895,9 +895,9 @@ function contact_block() { $micropro = Null; } else { - $r = q("SELECT * FROM `contact` - WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 and `pending` = 0 - AND `hidden` = 0 AND `archive` = 0 + $r = q("SELECT `id`, `uid`, `addr`, `url`, `name`, `micro`, `network` FROM `contact` + WHERE `uid` = %d AND NOT `self` AND NOT `blocked` AND NOT `pending` + AND NOT `hidden` AND NOT `archive` AND `network` IN ('%s', '%s', '%s') ORDER BY RAND() LIMIT %d", intval($a->profile['uid']), dbesc(NETWORK_DFRN), @@ -1415,12 +1415,15 @@ function prepare_body(&$item,$attach = false, $preview = false) { $item['hashtags'] = $hashtags; $item['mentions'] = $mentions; - $test = $item["rendered-html"]; - put_item_in_cache($item, true); - $s = $item["rendered-html"]; + // Update the cached values if there is no "zrl=..." on the links + $update = (!local_user() and !remote_user() and ($item["uid"] == 0)); + + // Or update it if the current viewer is the intented viewer + if (($item["uid"] == local_user()) AND ($item["uid"] != 0)) + $update = true; - //if ($test != $s) - // $s .= "