diff --git a/rss.php b/rss.php index bb6b8b1..2fa71d8 100644 --- a/rss.php +++ b/rss.php @@ -142,33 +142,22 @@ if (($current_time - $last_rss_gen) > $rss_refresh_interval && file_exists("rss. file_put_contents($old_files_list, $content); unlink("rss.locker"); } + /*===================*/ /* XML Gen */ /*===================*/ $temp = explode("\n", $temp); -$pieceOfTitle; -$titleLenght; -echo " - - - ".$title." - ".$gallery_link." - ".$description." - "; -for ($i=0; $i < $nb_items_rss; $i++) { - $pieceOfTitle = strrchr ($temp[$i] , "/"); - $titleLenght = strlen($pieceOfTitle) - strlen(strrchr($pieceOfTitle, ".")); - echo " - " . substr($pieceOfTitle, 1, $titleLenght-1) . " - ". $temp[$i] . " - - ]]> - - "; - if ($temp[$i+1] == NULL) - break; +echo "\n"; +echo "$title"; +echo "$gallery_link"; +echo "$description\n"; +for ($i=0; $i < $nb_items_rss && $i < count($temp); $i++) { + if (empty($temp[$i])) + continue; + echo "\n"; + echo " " . basename($temp[$i]) . "\n"; + echo " ". $temp[$i] . "\n"; + echo " ]]>\n"; + echo "\n"; } -echo " - - -"; +echo "\n";