If no channels are found in a particular group, say so.
This commit is contained in:
parent
4125bf6601
commit
0c02b8a597
1 changed files with 7 additions and 0 deletions
|
@ -136,6 +136,7 @@ ajax_channel_tab(http_connection_t *hc, http_reply_t *hr,
|
|||
channel_group_t *tcg;
|
||||
char dispname[20];
|
||||
struct sockaddr_in *si;
|
||||
int nchs = 0;
|
||||
|
||||
if(remain == NULL || (tcg = channel_group_by_tag(atoi(remain))) == NULL)
|
||||
return HTTP_STATUS_NOT_FOUND;
|
||||
|
@ -144,6 +145,8 @@ ajax_channel_tab(http_connection_t *hc, http_reply_t *hr,
|
|||
if(LIST_FIRST(&ch->ch_transports) == NULL)
|
||||
continue;
|
||||
|
||||
nchs++;
|
||||
|
||||
tcp_qprintf(tq, "<div style=\"float:left; width: 25%%\">");
|
||||
|
||||
snprintf(dispname, sizeof(dispname), "%s", ch->ch_name);
|
||||
|
@ -188,6 +191,10 @@ ajax_channel_tab(http_connection_t *hc, http_reply_t *hr,
|
|||
tcp_qprintf(tq, "</div>");
|
||||
}
|
||||
|
||||
if(nchs == 0)
|
||||
tcp_qprintf(tq, "<div style=\"text-align: center; font-weight: bold\">"
|
||||
"No channels in this group</div>");
|
||||
|
||||
http_output_html(hc, hr);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue