X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/2cdc2cb95e16975c4d210f8cebcc8b04a43b79ad..v3.6-26-ge6d26c2062:/nieuws.inc.php diff --git a/nieuws.inc.php b/nieuws.inc.php index c5dfa23..5485315 100644 --- a/nieuws.inc.php +++ b/nieuws.inc.php @@ -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; } @@ -70,22 +71,33 @@ class ArchiveArticle function body() { - return fread($this->file, filesize($this->page)); + $this->title; + $rest = fread($this->file, filesize($this->page)); + if ( preg_match('{\n
(]*>)