diff options
author | Friendika <info@friendika.com> | 2011-10-28 16:13:54 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-10-28 16:13:54 -0700 |
commit | b02598185803e60b36b033ef3ccf05d1bd4d3af2 (patch) | |
tree | 1bdeea2968673b0e70003845308dfc67c275927a /include/diaspora.php | |
parent | 2914ffb396259da2901ed261159eb51987b8d814 (diff) | |
download | volse-hubzilla-b02598185803e60b36b033ef3ccf05d1bd4d3af2.tar.gz volse-hubzilla-b02598185803e60b36b033ef3ccf05d1bd4d3af2.tar.bz2 volse-hubzilla-b02598185803e60b36b033ef3ccf05d1bd4d3af2.zip |
yet more diaspora images to scale
Diffstat (limited to 'include/diaspora.php')
-rw-r--r-- | include/diaspora.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/diaspora.php b/include/diaspora.php index 712ddd7b0..ccfa799ad 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -777,16 +777,19 @@ function diaspora_asphoto($importer,$xml) { $created = unxmlify($xml->created_at); $private = ((unxmlify($xml->public) == 'false') ? 1 : 0); - if(strlen($xml->objectId) && ($xml->objectId != 0) && ($xml->image_url)) + if(strlen($xml->objectId) && ($xml->objectId != 0) && ($xml->image_url)) { $body = '[url=' . notags(unxmlify($xml->image_url)) . '][img]' . notags(unxmlify($xml->objectId)) . '[/img][/url]' . "\n"; - elseif($xml->image_url) + $body = scale_diaspora_images($body,false); + } + elseif($xml->image_url) { $body = '[img]' . notags(unxmlify($xml->image_url)) . '[/img]' . "\n"; + $body = scale_diaspora_images($body); + } else { logger('diaspora_asphoto: no photo url found.'); return; } - $datarray = array(); @@ -1025,6 +1028,8 @@ function diaspora_photo($importer,$xml,$msg) { $link_text = '[img]' . $remote_photo_path . $remote_photo_name . '[/img]' . "\n"; + $link_text = scale_diaspora_images($link_text); + if(strpos($parent_item['body'],$link_text) === false) { $r = q("update item set `body` = '%s', `visible` = 1 where `id` = %d and `uid` = %d limit 1", dbesc($link_text . $parent_item['body']), |