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