| 746 |
return 0; |
return 0; |
| 747 |
} |
} |
| 748 |
|
|
| 749 |
int query_section_articles(SECTION_LIST *p_section, int32_t page_id, ARTICLE *p_articles[], int32_t *p_article_count) |
int query_section_articles(SECTION_LIST *p_section, int page_id, ARTICLE *p_articles[], int *p_article_count, int *p_page_count) |
| 750 |
{ |
{ |
| 751 |
ARTICLE *p_article; |
ARTICLE *p_article; |
| 752 |
ARTICLE *p_next_page_first_article; |
ARTICLE *p_next_page_first_article; |
| 753 |
int ret = 0; |
int ret = 0; |
| 754 |
|
|
| 755 |
if (p_section == NULL || p_articles == NULL || p_article_count == NULL) |
if (p_section == NULL || p_articles == NULL || p_article_count == NULL || p_page_count == NULL) |
| 756 |
{ |
{ |
| 757 |
log_error("query_section_articles() NULL pointer error\n"); |
log_error("query_section_articles() NULL pointer error\n"); |
| 758 |
return -1; |
return -1; |
| 765 |
return -2; |
return -2; |
| 766 |
} |
} |
| 767 |
|
|
| 768 |
|
*p_page_count = p_section->page_count; |
| 769 |
|
|
| 770 |
if (p_section->visible_article_count == 0) |
if (p_section->visible_article_count == 0) |
| 771 |
{ |
{ |
| 772 |
*p_article_count = 0; |
*p_article_count = 0; |