X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fprofile_photo.php;h=4de3aaa3e0c255e007d1b7590e9ef9ae3ecd788e;hb=e9638b69801cee3e74a97825f9af3749c9322c53;hp=8dc8966532d90e80309cd650403578144b085aa5;hpb=78b2db3a9840f551c951bf0a58a54cce08133bcf;p=friendica.git diff --git a/mod/profile_photo.php b/mod/profile_photo.php index 8dc8966532..4de3aaa3e0 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -155,9 +155,15 @@ function profile_photo_content(&$a) { notice( t('Permission denied.') . EOL ); return; } + $havescale = false; + foreach($r as $rr) { + if($rr['scale'] == 5) + $havescale = true; + } + // set an already uloaded photo as profile photo // if photo is in 'Profile Photos', change it in db - if ($r[0]['album']== t('Profile Photos')){ + if (($r[0]['album']== t('Profile Photos')) && ($havescale)){ $r=q("UPDATE `photo` SET `profile`=0 WHERE `profile`=1 AND `uid`=%d", intval(local_user()));