diff options
author | friendica <info@friendica.com> | 2014-01-29 03:16:07 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-01-29 03:16:07 -0800 |
commit | 6a9d43bcbe167ff3a8f9bd8a2ce93d9fc298fcdf (patch) | |
tree | 3bbc412c975bebcddb7ff39765d9c0858731644e | |
parent | c95f65e092e3ea3e4d312976789597ef91037b25 (diff) | |
download | volse-hubzilla-6a9d43bcbe167ff3a8f9bd8a2ce93d9fc298fcdf.tar.gz volse-hubzilla-6a9d43bcbe167ff3a8f9bd8a2ce93d9fc298fcdf.tar.bz2 volse-hubzilla-6a9d43bcbe167ff3a8f9bd8a2ce93d9fc298fcdf.zip |
debug chatroom_list widget
-rw-r--r-- | include/chat.php | 3 | ||||
-rw-r--r-- | view/tpl/chatroomlist.tpl | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/include/chat.php b/include/chat.php index 8011fdb5b..9d90f7970 100644 --- a/include/chat.php +++ b/include/chat.php @@ -121,8 +121,9 @@ function chatroom_leave($observer_xchan,$room_id,$status) { function chatroom_list($uid) { - $r = q("select cr_name, cr_id, count(cp_id) as cr_inroom from chatroom left join chatpresence on cr_id = cp_room where cr_uid = %d order by cr_name group by cp_id", + $r = q("select cr_name, cr_id, count(cp_id) as cr_inroom from chatroom left join chatpresence on cr_id = cp_room where cr_uid = %d group by cp_id order by cr_name", intval($uid) ); + return $r; }
\ No newline at end of file diff --git a/view/tpl/chatroomlist.tpl b/view/tpl/chatroomlist.tpl index 34050eef3..d2cf4d7b0 100644 --- a/view/tpl/chatroomlist.tpl +++ b/view/tpl/chatroomlist.tpl @@ -1,10 +1,10 @@ <div class="widget"> <h3>{{$header}}</h3> -{{$if $items}} +{{if $items}} <table> -{{for $items as $item}} +{{foreach $items as $item}} <tr><td>{{$item.cr_name}}</td><td>{{$item.cr_inroom}}</td></tr> -{{/for}} +{{/foreach}} </table> {{/if}} </div> |