/[LeafOK_CVS]/lbbs/src/article_favor.c
ViewVC logotype

Diff of /lbbs/src/article_favor.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.6 by sysadm, Wed Oct 29 01:48:46 2025 UTC Revision 1.10 by sysadm, Sun Nov 16 00:10:48 2025 UTC
# Line 1  Line 1 
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"
# Line 473  int query_favor_articles(ARTICLE_FAVOR * Line 469  int query_favor_articles(ARTICLE_FAVOR *
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)


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1