nieuws: support tagged article links
[minimedit.git] / nieuws.inc.php
index 438c282ec46ef311346592e5ab0a01af4fdc23da..930eb00a2c96a8b4cb415472a462d7fe20148702 100644 (file)
@@ -54,7 +54,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;
        }
 
@@ -96,7 +96,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);
        }
 }