From: Mischa POSLAWSKY Date: Wed, 9 Dec 2020 08:01:49 +0000 (+0100) Subject: page: retain thumb subhandlers over invalid resize X-Git-Tag: v5.0~17 X-Git-Url: http://git.shiar.nl/minimedit.git/commitdiff_plain/2ec9c2255379e0a0a6043bbb129d34900e17c6be page: retain thumb subhandlers over invalid resize Ignore non-static files such as /thumb/qr on Lijtweg. --- diff --git a/article.inc.php b/article.inc.php index 30de51e..3e67d6f 100644 --- a/article.inc.php +++ b/article.inc.php @@ -149,6 +149,9 @@ class ArchiveArticle function thumb($size = '300x') { if (!$this->image or $this->image[0] !== '/') return; + if (preg_match('{^/thumb/\D}', $this->image)) { + return ltrim($this->image, '/'); + } return preg_replace( ['{^(?:/thumb/[^/]*)?}', '/\.groot(?=\.\w+$)/'], ["thumb/$size", ''], $this->image