aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profile_photo.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-09-15 03:06:43 -0700
committerFriendika <info@friendika.com>2011-09-15 03:06:43 -0700
commit8f1e2efd5bf2266fd9603676a08ce0120c3e69ac (patch)
tree52d45fdb40fb05bbb04bc022c39b2d6c869e743f /mod/profile_photo.php
parent46b220518c0a95d394398998711088ac1268c343 (diff)
downloadvolse-hubzilla-8f1e2efd5bf2266fd9603676a08ce0120c3e69ac.tar.gz
volse-hubzilla-8f1e2efd5bf2266fd9603676a08ce0120c3e69ac.tar.bz2
volse-hubzilla-8f1e2efd5bf2266fd9603676a08ce0120c3e69ac.zip
if photo is uploaded to "profile photos" album it could not be made into profile photo.
Diffstat (limited to 'mod/profile_photo.php')
-rw-r--r--mod/profile_photo.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/mod/profile_photo.php b/mod/profile_photo.php
index 8dc896653..4de3aaa3e 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()));