cvs: php-master-web /scripts rss_parser
| From: | Mehdi Achour | Date: | Tue, 14 Jun 2005 11:02:13 +0000 |
| Subject: | cvs: php-master-web /scripts rss_parser | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-28476@lists.php.net to get a copy of this message | ||
didou Tue Jun 14 07:02:13 2005 EDT
Modified files:
/php-master-web/scripts rss_parser
Log:
fix: don't parse commented items
http://cvs.php.net/diff.php/php-master-web/scripts/rss_parser?r1=1.11&r2=1.12&ty=u
Index: php-master-web/scripts/rss_parser
diff -u php-master-web/scripts/rss_parser:1.11 php-master-web/scripts/rss_parser:1.12
--- php-master-web/scripts/rss_parser:1.11 Tue Jun 14 06:47:17 2005
+++ php-master-web/scripts/rss_parser Tue Jun 14 07:02:13 2005
@@ -64,6 +64,9 @@
// Parse the index file searching for news item information
function ParseNews ($index_page = "") {
+ // Remove commented items
+ $index_page = preg_replace("/<!--[\w\W]*?-->/Um", "", $index_page);
+
// Split the file by newlines
$lines = preg_split("/\n/", $index_page);
#DEBUG# print "<pre>"; print_r($lines); print "</pre>";