mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 05:35:12 +00:00
fix to poco chatrooms
This commit is contained in:
parent
43254029ad
commit
ec4d3a2349
1 changed files with 4 additions and 4 deletions
|
@ -76,7 +76,7 @@ function poco_init(&$a) {
|
|||
$sql_extra ",
|
||||
intval($channel_id)
|
||||
);
|
||||
$c = q("select * from menu_item where ( mitem_flags & " . intval(MENU_ITEM_CHATROOM) . " )>0 and allow_cid = '' and allow_gid = '' and deny_cid = '' and deny_gid = '' and mitem_channel_id = %d",
|
||||
$rooms = q("select * from menu_item where ( mitem_flags & " . intval(MENU_ITEM_CHATROOM) . " )>0 and allow_cid = '' and allow_gid = '' and deny_cid = '' and deny_gid = '' and mitem_channel_id = %d",
|
||||
intval($channel_id)
|
||||
);
|
||||
}
|
||||
|
@ -119,10 +119,10 @@ function poco_init(&$a) {
|
|||
$ret['itemsPerPage'] = (string) $itemsPerPage;
|
||||
$ret['totalResults'] = (string) $totalResults;
|
||||
|
||||
if($c) {
|
||||
if($rooms) {
|
||||
$ret['chatrooms'] = array();
|
||||
foreach($c as $d) {
|
||||
$ret['chatrooms'][] = array('url' => $d['mitem_link'], 'desc' => $d['mitem_desc']);
|
||||
foreach($rooms as $room) {
|
||||
$ret['chatrooms'][] = array('url' => $room['mitem_link'], 'desc' => $room['mitem_desc']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue