aboutsummaryrefslogtreecommitdiffstats
path: root/include/contact_widgets.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-12-07 13:05:17 -0800
committerfriendica <info@friendica.com>2013-12-07 13:05:17 -0800
commit6dc157a9f9f46dbb4fe694d32e733eb1a2f5444f (patch)
tree5ed0d5230fe7c1ab7a242dd3e58559ddf4780f35 /include/contact_widgets.php
parente33d9d358a8cee4851e7db22258bc70c9ac9dab3 (diff)
downloadvolse-hubzilla-6dc157a9f9f46dbb4fe694d32e733eb1a2f5444f.tar.gz
volse-hubzilla-6dc157a9f9f46dbb4fe694d32e733eb1a2f5444f.tar.bz2
volse-hubzilla-6dc157a9f9f46dbb4fe694d32e733eb1a2f5444f.zip
finish ACL's in personal menus
Diffstat (limited to 'include/contact_widgets.php')
-rw-r--r--include/contact_widgets.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/contact_widgets.php b/include/contact_widgets.php
index ddc89346a..2fa5dee0b 100644
--- a/include/contact_widgets.php
+++ b/include/contact_widgets.php
@@ -170,14 +170,16 @@ function suggest_widget() {
// This will throw some entropy intot he situation so you won't
// be looking at the same two mug shots every time the widget runs
- $index = mt_rand(0,count($r) - 2);
-
-
+
+ $index = ((count($r) > 2) ? mt_rand(0,count($r) - 2) : 0);
+
for($x = $index; $x <= ($index+1); $x ++) {
$rr = $r[$x];
-
+ if(! $rr['xchan_url'])
+ break;
+
$connlnk = z_root() . '/follow/?url=' . $rr['xchan_addr'];
$arr[] = array(