aboutsummaryrefslogtreecommitdiffstats
path: root/include/feedutils.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/feedutils.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/feedutils.php')
-rw-r--r--include/feedutils.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/feedutils.php b/include/feedutils.php
index 4638ef66a..5e48cb1ee 100644
--- a/include/feedutils.php
+++ b/include/feedutils.php
@@ -1801,12 +1801,17 @@ function compat_photos_list($s) {
if($found) {
foreach($matches as $match) {
- $ret[] = [
+ $entry = [
'href' => $match[2],
- 'length' => 0,
'type' => guess_image_type($match[2])
];
+ $sizer = new \Zotlabs\Lib\Img_filesize($match[2]);
+ $size = $sizer->getSize();
+ if(intval($size)) {
+ $entry['length'] = intval($size);
+ }
+ $ret[] = $entry;
}
}