aboutsummaryrefslogtreecommitdiffstats
path: root/include/widgets.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-11-23 20:29:34 -0800
committerfriendica <info@friendica.com>2014-11-23 20:29:34 -0800
commit53dc9cf2eb078f452979dc1dc9146ab993425621 (patch)
treea5d0217c4feb92e6ef56b181b8eab37dc99e44df /include/widgets.php
parent79e5c2456bfc78296d77d1a4caedd5a32b7d9d12 (diff)
downloadvolse-hubzilla-53dc9cf2eb078f452979dc1dc9146ab993425621.tar.gz
volse-hubzilla-53dc9cf2eb078f452979dc1dc9146ab993425621.tar.bz2
volse-hubzilla-53dc9cf2eb078f452979dc1dc9146ab993425621.zip
basic vcalendar formatting support
Diffstat (limited to 'include/widgets.php')
-rw-r--r--include/widgets.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/widgets.php b/include/widgets.php
index a25139558..f7b8a20bd 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -659,9 +659,11 @@ function widget_bookmarkedchats($arr) {
$r = q("select * from xchat where xchat_xchan = '%s' group by xchat_url order by xchat_desc",
dbesc($h)
);
-
- for($x = 0; $x < count($r); $x ++)
- $r[$x]['xchat_url'] = zid($r[$x]['xchat_url']);
+ if($r) {
+ for($x = 0; $x < count($r); $x ++) {
+ $r[$x]['xchat_url'] = zid($r[$x]['xchat_url']);
+ }
+ }
return replace_macros(get_markup_template('bookmarkedchats.tpl'),array(
'$header' => t('Bookmarked Chatrooms'),
'$rooms' => $r
@@ -677,9 +679,11 @@ function widget_suggestedchats($arr) {
if(! $h)
return;
$r = q("select *, count(xchat_url) as total from xchat group by xchat_url order by total desc, xchat_desc limit 24");
-
- for($x = 0; $x < count($r); $x ++)
- $r[$x]['xchat_url'] = zid($r[$x]['xchat_url']);
+ if($r) {
+ for($x = 0; $x < count($r); $x ++) {
+ $r[$x]['xchat_url'] = zid($r[$x]['xchat_url']);
+ }
+ }
return replace_macros(get_markup_template('bookmarkedchats.tpl'),array(
'$header' => t('Suggested Chatrooms'),
'$rooms' => $r