aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgetfeeds.php10
1 files 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);
?>