Prefer cron.php to update grouplist instead of when a client clicks on it.
This commit is contained in:
parent
da8c476634
commit
3743a38b47
|
@ -24,7 +24,7 @@ if (isset($_REQUEST['groupsearch'])) {
|
||||||
echo '<div class="grouplist_header_title">List of Available Newsgroups:</div>';
|
echo '<div class="grouplist_header_title">List of Available Newsgroups:</div>';
|
||||||
|
|
||||||
// Use cache if new enough
|
// Use cache if new enough
|
||||||
if (filemtime($grouplist_cache_filename) > (time() - 3600)) {
|
if (filemtime($grouplist_cache_filename) > (time() - 15000)) {
|
||||||
// Allow refresh from cron.php
|
// Allow refresh from cron.php
|
||||||
if (isset($argv[1]) && $argv[1] == '.RELOAD') {
|
if (isset($argv[1]) && $argv[1] == '.RELOAD') {
|
||||||
// Do not use cache, instead rebuild grouplist
|
// Do not use cache, instead rebuild grouplist
|
||||||
|
|
|
@ -180,7 +180,7 @@ if (file_exists($config_dir . '/cache.inc.php')) {
|
||||||
exec($CONFIG['php_exec'] . " " . $config_dir . "/scripts/rss-feeds.php");
|
exec($CONFIG['php_exec'] . " " . $config_dir . "/scripts/rss-feeds.php");
|
||||||
echo "RSS Feeds updated\n";
|
echo "RSS Feeds updated\n";
|
||||||
# Reload grouplist
|
# 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");
|
exec($CONFIG['php_exec'] . " ../common/grouplist.php .RELOAD");
|
||||||
echo "Refreshed grouplist\n";
|
echo "Refreshed grouplist\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue