X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/eef50167aaa4e525f1eb5a462c441ce8a203c43d..e6d26c20628195fde6f3edfb31e5db8d31551adf:/nieuws.inc.php diff --git a/nieuws.inc.php b/nieuws.inc.php index 438c282..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('', $this->page, $ymd); + preg_match('', $this->page, $ymd); return $ymd; } @@ -96,7 +97,7 @@ class ArchiveArticle function thumb($size = '300x') { if (!$this->image or $this->image[0] !== '/') return; - return "thumb/$size{$this->image}"; + return preg_replace('{^(?:/thumb/[^/]*)?}', "thumb/$size", $this->image); } }