diff options
author | friendica <info@friendica.com> | 2014-02-25 19:48:13 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-02-25 19:48:13 -0800 |
commit | e7e97e578b3069b8d24ea2a18ce4d3648b402ca3 (patch) | |
tree | a2fce103f82322b6680b6ac7207ca080c53f29cb /mod | |
parent | 2c72e49d1f63404b464f284d86ce2dce7f2eb493 (diff) | |
download | volse-hubzilla-e7e97e578b3069b8d24ea2a18ce4d3648b402ca3.tar.gz volse-hubzilla-e7e97e578b3069b8d24ea2a18ce4d3648b402ca3.tar.bz2 volse-hubzilla-e7e97e578b3069b8d24ea2a18ce4d3648b402ca3.zip |
put bookmarked chatrooms into poco
Diffstat (limited to 'mod')
-rw-r--r-- | mod/poco.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mod/poco.php b/mod/poco.php index a5808b7db..9295f13de 100644 --- a/mod/poco.php +++ b/mod/poco.php @@ -76,6 +76,9 @@ function poco_init(&$a) { $sql_extra ", intval($channel_id) ); + $c = q("select * from menu_item where ( mitem_flags & " . intval(MENU_ITEM_CHATROOM) . " ) and allow_cid = '' and allow_gid = '' and deny_cid = '' and deny_gid = '' and mitem_channel_id = %d", + intval($channel_id) + ); } if($r) $totalResults = intval($r[0]['total']); @@ -115,6 +118,14 @@ function poco_init(&$a) { $ret['startIndex'] = (string) $startIndex; $ret['itemsPerPage'] = (string) $itemsPerPage; $ret['totalResults'] = (string) $totalResults; + + if($c) { + $ret['chatrooms'] = array(); + foreach($c as $d) { + $ret['chatrooms'][] = array('url' => $d['mitem_link'], 'desc' => $d['mitem_desc']); + } + } + $ret['entry'] = array(); |