From 9fa929fab5c4c547951a0b42e7d56a94aea17564 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 25 May 2014 23:00:06 -0700 Subject: filter randprof results to avoid channels that are known to be deceased. --- include/Contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/Contact.php') diff --git a/include/Contact.php b/include/Contact.php index 540e1169d..0cd4be72c 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -510,7 +510,7 @@ function unmark_for_death($contact) { }} function random_profile() { - $r = q("select xchan_url from xchan where 1 order by rand() limit 1"); + $r = q("select xchan_url from xchan left join hubloc on hubloc_hash = xchan_hash where hubloc_connected > UTC_TIMESTAMP() - interval 30 day order by rand() limit 1"); if($r) return $r[0]['xchan_url']; return ''; -- cgit v1.2.3