debug chatroom_list widget

This commit is contained in:
friendica 2014-01-29 03:16:07 -08:00
parent c95f65e092
commit 6a9d43bcbe
2 changed files with 5 additions and 4 deletions

View File

@ -121,8 +121,9 @@ function chatroom_leave($observer_xchan,$room_id,$status) {
function chatroom_list($uid) { 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) intval($uid)
); );
return $r; return $r;
} }

View File

@ -1,10 +1,10 @@
<div class="widget"> <div class="widget">
<h3>{{$header}}</h3> <h3>{{$header}}</h3>
{{$if $items}} {{if $items}}
<table> <table>
{{for $items as $item}} {{foreach $items as $item}}
<tr><td>{{$item.cr_name}}</td><td>{{$item.cr_inroom}}</td></tr> <tr><td>{{$item.cr_name}}</td><td>{{$item.cr_inroom}}</td></tr>
{{/for}} {{/foreach}}
</table> </table>
{{/if}} {{/if}}
</div> </div>