From 3743a38b47bb35b008afc785caf4724999355b16 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Wed, 27 Nov 2024 02:52:28 -0700 Subject: [PATCH] Prefer cron.php to update grouplist instead of when a client clicks on it. --- Rocksolid_Light/common/grouplist.php | 2 +- Rocksolid_Light/rslight/scripts/cron.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Rocksolid_Light/common/grouplist.php b/Rocksolid_Light/common/grouplist.php index dff6abf..1b591ac 100644 --- a/Rocksolid_Light/common/grouplist.php +++ b/Rocksolid_Light/common/grouplist.php @@ -24,7 +24,7 @@ if (isset($_REQUEST['groupsearch'])) { echo '
List of Available Newsgroups:
'; // Use cache if new enough -if (filemtime($grouplist_cache_filename) > (time() - 3600)) { +if (filemtime($grouplist_cache_filename) > (time() - 15000)) { // Allow refresh from cron.php if (isset($argv[1]) && $argv[1] == '.RELOAD') { // Do not use cache, instead rebuild grouplist diff --git a/Rocksolid_Light/rslight/scripts/cron.php b/Rocksolid_Light/rslight/scripts/cron.php index 9945955..147043d 100644 --- a/Rocksolid_Light/rslight/scripts/cron.php +++ b/Rocksolid_Light/rslight/scripts/cron.php @@ -180,7 +180,7 @@ if (file_exists($config_dir . '/cache.inc.php')) { exec($CONFIG['php_exec'] . " " . $config_dir . "/scripts/rss-feeds.php"); echo "RSS Feeds updated\n"; # Reload grouplist -if ((filemtime($grouplist_cache_filename) < (time() - 3600) || ! file_exists($grouplist_cache_filename))) { +if ((filemtime($grouplist_cache_filename) < (time() - 14400) || ! file_exists($grouplist_cache_filename))) { exec($CONFIG['php_exec'] . " ../common/grouplist.php .RELOAD"); echo "Refreshed grouplist\n"; }