aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2018-11-13 11:25:14 +0100
committerMax Kostikov <max@kostikov.co>2018-11-13 11:25:14 +0100
commit6375f2d73a0c314e8de12071f1e604e59d8c76de (patch)
treede47c317dc3df67049b6593358d822011c0062da
parenta7d3a49171d7b7ab5e1daacf64dd7f296b54e738 (diff)
downloadvolse-hubzilla-6375f2d73a0c314e8de12071f1e604e59d8c76de.tar.gz
volse-hubzilla-6375f2d73a0c314e8de12071f1e604e59d8c76de.tar.bz2
volse-hubzilla-6375f2d73a0c314e8de12071f1e604e59d8c76de.zip
Replace fetch_image_from_url() with z_fetch_url()
-rw-r--r--Zotlabs/Module/Photo.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php
index 95e3404fb..69685a257 100644
--- a/Zotlabs/Module/Photo.php
+++ b/Zotlabs/Module/Photo.php
@@ -89,11 +89,11 @@ class Photo extends \Zotlabs\Web\Controller {
}
if(! $data) {
- $data = fetch_image_from_url($default,$mimetype);
- }
- if(! $mimetype) {
+ $x = z_fetch_url($default,true,0,[ 'novalidate' => true ]);
+ $data = $x['body'];
$mimetype = 'image/png';
}
+
}
else {
@@ -200,19 +200,22 @@ class Photo extends \Zotlabs\Web\Controller {
if(isset($resolution)) {
switch($resolution) {
case 4:
- $data = fetch_image_from_url(z_root() . '/' . get_default_profile_photo(),$mimetype);
+ $default = z_root() . '/' . get_default_profile_photo();
break;
case 5:
- $data = fetch_image_from_url(z_root() . '/' . get_default_profile_photo(80),$mimetype);
+ $default = z_root() . '/' . get_default_profile_photo(80);
break;
case 6:
- $data = fetch_image_from_url(z_root() . '/' . get_default_profile_photo(48),$mimetype);
+ $default = z_root() . '/' . get_default_profile_photo(48);
break;
default:
killme();
// NOTREACHED
break;
}
+ $x = z_fetch_url($default,true,0,[ 'novalidate' => true ]);
+ $data = $x['body'];
+ $mimetype = 'image/png';
}
}