| 1 |
/*************************************************************************** |
/* SPDX-License-Identifier: GPL-3.0-or-later */ |
| 2 |
article_favor.c - description |
/* |
| 3 |
------------------- |
* article_favor |
| 4 |
Copyright : (C) 2004-2025 by Leaflet |
* - data model and basic operations of user favorite articles |
| 5 |
Email : leaflet@leafok.com |
* |
| 6 |
***************************************************************************/ |
* Copyright (C) 2004-2025 Leaflet <leaflet@leafok.com> |
| 7 |
|
*/ |
| 8 |
/*************************************************************************** |
|
| 9 |
* * |
#ifdef HAVE_CONFIG_H |
| 10 |
* This program is free software; you can redistribute it and/or modify * |
#include "config.h" |
| 11 |
* it under the terms of the GNU General Public License as published by * |
#endif |
|
* the Free Software Foundation; either version 3 of the License, or * |
|
|
* (at your option) any later version. * |
|
|
* * |
|
|
***************************************************************************/ |
|
| 12 |
|
|
| 13 |
#include "article_favor.h" |
#include "article_favor.h" |
| 14 |
#include "common.h" |
#include "common.h" |
| 469 |
return -2; |
return -2; |
| 470 |
} |
} |
| 471 |
|
|
| 472 |
*p_page_count = p_favor->aid_base_cnt / BBS_article_limit_per_page + (p_favor->aid_base_cnt % BBS_article_limit_per_page == 0 ? 0 : 1); |
*p_page_count = (p_favor->aid_base_cnt + BBS_article_limit_per_page - 1) / BBS_article_limit_per_page; |
| 473 |
*p_article_count = 0; |
*p_article_count = 0; |
| 474 |
|
|
| 475 |
if (p_favor->aid_base_cnt == 0) |
if (p_favor->aid_base_cnt == 0) |