From 559871cd8af1f161df473bc967c9f651664e4371 Mon Sep 17 00:00:00 2001 From: Philip Wittamore Date: Wed, 25 Feb 2026 09:23:51 +0100 Subject: update --- getfeeds.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/getfeeds.php b/getfeeds.php index a632c5f..c561247 100755 --- a/getfeeds.php +++ b/getfeeds.php @@ -20,16 +20,11 @@ if (file_exists("$root/$hs")) { copy("$root/$hs", "$root/gophermap"); $dt = new DateTime("now", new DateTimeZone('Europe/Paris')); file_put_contents("$root/gophermap", "last update: ".$dt->format('Y-m-d H:i:s')."\n\n", FILE_APPEND); -}else{ - echo "$root/$hs not found, aborting"; - exit; } // iterate through feed directories -// each directory contains the feed url and title -// and receives the constructed gophermap foreach ($dir as $subdir) { - # if config files missing go to next directory + # get feed settings from directory if (!file_exists("$subdir/$fs")) continue; if (!file_exists("$subdir/$ts")) continue; @@ -111,6 +106,7 @@ foreach ($dir as $subdir) { $itemlist .= $rssstring; } } + file_put_contents("$subdir/gophermap", $itemlist); file_put_contents("$subdir/gophermap", str_repeat("\n ", 30), FILE_APPEND); @@ -125,7 +121,7 @@ foreach ($dir as $subdir) { unset($itemlist); } -// add empty lines to gophermap +// add empyu lines to gophermap file_put_contents("$root/gophermap", str_repeat("\n ", 30), FILE_APPEND); ?> -- cgit v1.2.3