page: retain thumb subhandlers over invalid resize
[minimedit.git] / article.inc.php
index 30de51e770ba18bf9b2cb87a9b962a77d8674ff2..3e67d6f1a457d59a9646babcbe83f2aa242821eb 100644 (file)
@@ -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