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
(from parent 1:
9e98cbb
)
page: retain thumb subhandlers over invalid resize
author
Mischa POSLAWSKY
<perl@shiar.org>
Wed, 9 Dec 2020 08:01:49 +0000
(09:01 +0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 19 Dec 2020 02:01:43 +0000
(
03:01
+0100)
Ignore non-static files such as /thumb/qr on Lijtweg.
article.inc.php
patch
|
blob
|
history
diff --git
a/article.inc.php
b/article.inc.php
index 30de51e770ba18bf9b2cb87a9b962a77d8674ff2..3e67d6f1a457d59a9646babcbe83f2aa242821eb 100644
(file)
--- 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