git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
page: retain thumb subhandlers over invalid resize
[minimedit.git]
/
article.inc.php
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;
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
return preg_replace(
['{^(?:/thumb/[^/]*)?}', '/\.groot(?=\.\w+$)/'], ["thumb/$size", ''],
$this->image