nieuws: ignore missing image/contents of new articles
[minimedit.git] / nieuws.inc.php
index 79f718d4b6585ba0296a7b4cfb1f3581ccab581b..54853158a6a18ea14514757469d470d9bb4c8f34 100644 (file)
@@ -29,6 +29,7 @@ class ArchiveArticle
 
        function file()
        {
+               if (!file_exists($this->page)) return;
                return fopen($this->page, 'r');
        }
 
@@ -54,7 +55,7 @@ class ArchiveArticle
 
        function dateparts()
        {
-               preg_match('</(\d{4})/(\d{2})-(\d{2})->', $this->page, $ymd);
+               preg_match('</(\d{4})[/-](\d{2})-(\d{2})->', $this->page, $ymd);
                return $ymd;
        }