aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-01-08 14:50:58 -0800
committerzotlabs <mike@macgirvin.com>2018-01-08 14:50:58 -0800
commit75804d7ce57a476c85a486c807ea1f5a75235a0e (patch)
tree13794288d5ffca739248d9ec017ef1a4cef9b93d /include/network.php
parentd4af870bb6500747790e6f196afeb4d75011185d (diff)
parent0600817ef75d19d1ec91ba822f8a6938d442824e (diff)
downloadvolse-hubzilla-75804d7ce57a476c85a486c807ea1f5a75235a0e.tar.gz
volse-hubzilla-75804d7ce57a476c85a486c807ea1f5a75235a0e.tar.bz2
volse-hubzilla-75804d7ce57a476c85a486c807ea1f5a75235a0e.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/network.php b/include/network.php
index 3569874be..79a8c6578 100644
--- a/include/network.php
+++ b/include/network.php
@@ -752,13 +752,14 @@ function scale_external_images($s, $include_link = true, $scale_replace = false)
if($orig_width > 1024 || $orig_height > 1024) {
$tag = (($match[1] == 'z') ? 'zmg' : 'img');
+ $linktag = (($match[1] == 'z') ? 'zrl' : 'url');
$ph->scaleImage(1024);
$new_width = $ph->getWidth();
$new_height = $ph->getHeight();
logger('data: ' . $orig_width . '->' . $new_width . 'w ' . $orig_height . '->' . $new_height . 'h' . ' match: ' . $mtch[0], LOGGER_DEBUG);
$s = str_replace($mtch[0],'[' . $tag . '=' . $new_width . 'x' . $new_height. ']' . $scaled . '[/' . $tag . ']'
. "\n" . (($include_link)
- ? '[zrl=' . $mtch[2] . ']' . t('view full size') . '[/zrl]' . "\n"
+ ? '[' . $linktag . '=' . $mtch[3] . ']' . t('view full size') . '[/' . $linktag . ']' . "\n"
: ''),$s);
logger('new string: ' . $s, LOGGER_DEBUG);
}