From c187ac6e57f58c4b3fb5e400e9ca3a61b5ec37f9 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 26 Aug 2018 01:52:01 +0200 Subject: [PATCH] nieuws: replace existing thumb prefix in cover images Prevent duplicate resizing. --- nieuws.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nieuws.inc.php b/nieuws.inc.php index 438c282..79f718d 100644 --- a/nieuws.inc.php +++ b/nieuws.inc.php @@ -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); } } -- 2.30.0