aboutsummaryrefslogtreecommitdiffstats
path: root/mod/poco.php
diff options
context:
space:
mode:
authorPaolo T <tuscanhobbit@users.noreply.github.com>2014-03-15 19:14:10 +0100
committerPaolo T <tuscanhobbit@users.noreply.github.com>2014-03-15 19:14:10 +0100
commit9b64c6163cba7530ee09e47b44e62c3e8ecf69ef (patch)
treee84880e412390f44e67aff1497562e633deed136 /mod/poco.php
parent4fd0d1489825bd456e0cac77b47de156ff94c0cc (diff)
parent3cb179aff19d803b91261e410c50b36e4bae1246 (diff)
downloadvolse-hubzilla-9b64c6163cba7530ee09e47b44e62c3e8ecf69ef.tar.gz
volse-hubzilla-9b64c6163cba7530ee09e47b44e62c3e8ecf69ef.tar.bz2
volse-hubzilla-9b64c6163cba7530ee09e47b44e62c3e8ecf69ef.zip
Merge pull request #2 from friendica/master
merge from friendica/red
Diffstat (limited to 'mod/poco.php')
-rw-r--r--mod/poco.php11
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();