diff options
author | Friendika <info@friendika.com> | 2010-11-04 23:50:32 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2010-11-04 23:50:32 -0700 |
commit | b94cb8d234d70bc534ad1cef767b9f62d10eef26 (patch) | |
tree | 9e8cf0d529421c7b8d8e389478be8c4b196d11e6 /mod/photo.php | |
parent | 71ae08d506130e45f68cf4e09d71f3a1c2e2d782 (diff) | |
download | volse-hubzilla-b94cb8d234d70bc534ad1cef767b9f62d10eef26.tar.gz volse-hubzilla-b94cb8d234d70bc534ad1cef767b9f62d10eef26.tar.bz2 volse-hubzilla-b94cb8d234d70bc534ad1cef767b9f62d10eef26.zip |
add micro profile photo
Diffstat (limited to 'mod/photo.php')
-rw-r--r-- | mod/photo.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mod/photo.php b/mod/photo.php index 4e0b85b45..d4abb041a 100644 --- a/mod/photo.php +++ b/mod/photo.php @@ -16,15 +16,22 @@ function photo_init(&$a) { return; // NOTREACHED } + $default = 'images/default-profile.jpg'; + if(isset($type)) { switch($type) { case 'profile': $resolution = 4; break; + case 'micro': + $resolution = 6; + $default = 'images/default-profile-mm.jpg'; + break; case 'avatar': default: $resolution = 5; + $default = 'images/default-profile-sm.jpg'; break; } @@ -38,9 +45,7 @@ function photo_init(&$a) { $data = $r[0]['data']; } if(! isset($data)) { - $data = file_get_contents(($resolution == 5) - ? 'images/default-profile-sm.jpg' - : 'images/default-profile.jpg'); + $data = file_get_contents($default); } } else { |