X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fphoto.php;h=3a702512005789bd187440d8cba585114b565641;hb=1780fff1611809a6069603eceb643e210b4b3f36;hp=a5a5a1dc174fb05ecb1a7e9bc64b527aed58b5eb;hpb=65e981c4b022d3be211a701c37635c2d2af0f92f;p=friendica.git diff --git a/mod/photo.php b/mod/photo.php old mode 100644 new mode 100755 index a5a5a1dc17..3a70251200 --- a/mod/photo.php +++ b/mod/photo.php @@ -23,7 +23,7 @@ function photo_init(&$a) { // NOTREACHED } - $default = 'images/default-profile.jpg'; + $default = 'images/person-175.jpg'; if(isset($type)) { @@ -39,12 +39,12 @@ function photo_init(&$a) { break; case 'micro': $resolution = 6; - $default = 'images/default-profile-mm.jpg'; + $default = 'images/person-48.jpg'; break; case 'avatar': default: $resolution = 5; - $default = 'images/default-profile-sm.jpg'; + $default = 'images/person-80.jpg'; break; } @@ -115,11 +115,27 @@ function photo_init(&$a) { } if(! isset($data)) { - killme(); - // NOTREACHED + if(isset($resolution)) { + switch($resolution) { + + case 4: + $data = file_get_contents('images/person-175.jpg'); + break; + case 5: + $data = file_get_contents('images/person-80.jpg'); + break; + case 6: + $data = file_get_contents('images/person-48.jpg'); + break; + default: + killme(); + // NOTREACHED + break; + } + } } - if(intval($customres) && $customres > 0 && $customres < 500) { + if(isset($customres) && $customres > 0 && $customres < 500) { require_once('include/Photo.php'); $ph = new Photo($data); if($ph->is_valid()) {