git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af49d9b
)
nieuws: replace existing thumb prefix in cover images
author
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 25 Aug 2018 23:52:01 +0000
(
01:52
+0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 25 Aug 2018 23:52:01 +0000
(
01:52
+0200)
Prevent duplicate resizing.
nieuws.inc.php
patch
|
blob
|
history
diff --git
a/nieuws.inc.php
b/nieuws.inc.php
index 438c282ec46ef311346592e5ab0a01af4fdc23da..79f718d4b6585ba0296a7b4cfb1f3581ccab581b 100644
(file)
--- 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)
;
}
}