Update Photo.php

This commit is contained in:
Max Kostikov 2018-11-13 12:52:35 +01:00
parent a145559662
commit cf2f7f2132

View File

@ -198,20 +198,20 @@ class Photo extends \Zotlabs\Web\Controller {
if(isset($resolution)) { if(isset($resolution)) {
switch($resolution) { switch($resolution) {
case 4: case 4:
$default = z_root() . '/' . get_default_profile_photo(); $default = get_default_profile_photo();
break; break;
case 5: case 5:
$default = z_root() . '/' . get_default_profile_photo(80); $default = get_default_profile_photo(80);
break; break;
case 6: case 6:
$default = z_root() . '/' . get_default_profile_photo(48); $default = get_default_profile_photo(48);
break; break;
default: default:
killme(); killme();
// NOTREACHED // NOTREACHED
break; break;
} }
$x = z_fetch_url($default,true,0,[ 'novalidate' => true ]); $x = z_fetch_url(z_root() . '/' . $default,true,0,[ 'novalidate' => true ]);
$data = ($x['success'] ? $x['body'] : EMPTY_STR); $data = ($x['success'] ? $x['body'] : EMPTY_STR);
$mimetype = 'image/png'; $mimetype = 'image/png';
} }