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

Diff of /lbbs/src/article_favor_display.c

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

Revision 1.5 by sysadm, Sat Oct 18 12:49:13 2025 UTC Revision 1.11 by sysadm, Wed Dec 3 14:04:02 2025 UTC
# Line 1  Line 1 
1  /***************************************************************************  /* SPDX-License-Identifier: GPL-3.0-or-later */
2                                          article_favor_display.c  -  description  /*
3                                                           -------------------   * article_favor_display
4          Copyright            : (C) 2004-2025 by Leaflet   *   - user interactive feature to display 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_display.h"  #include "article_favor_display.h"
14  #include "article_view_log.h"  #include "article_view_log.h"
# Line 60  static int article_favor_draw_screen(int Line 56  static int article_favor_draw_screen(int
56          return 0;          return 0;
57  }  }
58    
59  static int article_favor_draw_items(int page_id, ARTICLE *p_articles[], char p_snames[][BBS_section_name_max_len + 1],  static int article_favor_draw_items(int page_id, const ARTICLE *p_articles[], char p_snames[][BBS_section_name_max_len + 1],
60                                                                          int article_count, int display_sname)                                                                          int article_count, int display_sname)
61  {  {
62          char str_time[LINE_BUFFER_LEN];          char str_time[LINE_BUFFER_LEN];
# Line 165  static enum select_cmd_t article_favor_s Line 161  static enum select_cmd_t article_favor_s
161                  if (ch != KEY_NULL && ch != KEY_TIMEOUT)                  if (ch != KEY_NULL && ch != KEY_TIMEOUT)
162                  {                  {
163                          BBS_last_access_tm = time(NULL);                          BBS_last_access_tm = time(NULL);
164    
165                            // Refresh current action
166                            if (user_online_update(NULL) < 0)
167                            {
168                                    log_error("user_online_update(NULL) error\n");
169                            }
170                  }                  }
171    
172                  switch (ch)                  switch (ch)
# Line 175  static enum select_cmd_t article_favor_s Line 177  static enum select_cmd_t article_favor_s
177                  case KEY_LEFT:                  case KEY_LEFT:
178                          return EXIT_LIST; // exit list                          return EXIT_LIST; // exit list
179                  case KEY_TIMEOUT:                  case KEY_TIMEOUT:
180                          if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME)                          if (time(NULL) - BBS_last_access_tm >= BBS_max_user_idle_time)
181                          {                          {
182                                  log_error("User input timeout\n");                                  log_error("User input timeout\n");
183                                  return EXIT_LIST; // exit list                                  return EXIT_LIST; // exit list
# Line 297  int article_favor_display(ARTICLE_FAVOR Line 299  int article_favor_display(ARTICLE_FAVOR
299    
300          char page_info_str[LINE_BUFFER_LEN];          char page_info_str[LINE_BUFFER_LEN];
301          char snames[BBS_article_limit_per_page][BBS_section_name_max_len + 1];          char snames[BBS_article_limit_per_page][BBS_section_name_max_len + 1];
302          ARTICLE *p_articles[BBS_article_limit_per_page];          const ARTICLE *p_articles[BBS_article_limit_per_page];
303          int article_count;          int article_count;
304          int page_count;          int page_count;
305          int page_id = 0;          int page_id = 0;


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

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