diff options
author | Paolo T <tuscanhobbit@users.noreply.github.com> | 2014-02-25 16:33:40 +0100 |
---|---|---|
committer | Paolo T <tuscanhobbit@users.noreply.github.com> | 2014-02-25 16:33:40 +0100 |
commit | 0a98f6b878ec89be7282621192d9daf80f125e6c (patch) | |
tree | 718a4771ce1fb86931531226898b0b5d00e4a337 /mod/photo.php | |
parent | 34d30e4d7eb48bd801482531a0d775328bd43ab4 (diff) | |
parent | b1021df485fb6129acda5bba616bac10aea75a45 (diff) | |
download | volse-hubzilla-0a98f6b878ec89be7282621192d9daf80f125e6c.tar.gz volse-hubzilla-0a98f6b878ec89be7282621192d9daf80f125e6c.tar.bz2 volse-hubzilla-0a98f6b878ec89be7282621192d9daf80f125e6c.zip |
Merge pull request #1 from friendica/master
Update this fork
Diffstat (limited to 'mod/photo.php')
-rw-r--r-- | mod/photo.php | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/mod/photo.php b/mod/photo.php index 591d7198a..1319f9569 100644 --- a/mod/photo.php +++ b/mod/photo.php @@ -22,9 +22,17 @@ function photo_init(&$a) { // NOTREACHED } + if($photo === 'qr') { + $t = $_GET['qr']; + require_once('library/phpqrcode/phpqrcode.php'); + header("Content-type: image/png"); + QRcode::png(($t) ? $t : '.'); + killme(); + } + $observer_xchan = get_observer_hash(); - $default = 'images/default_profile_photos/rainbow_man/175.jpg'; + $default = get_default_profile_photo(); if(isset($type)) { @@ -38,11 +46,11 @@ function photo_init(&$a) { case 'm': $resolution = 5; - $default = 'images/default_profile_photos/rainbow_man/80.jpg'; + $default = get_default_profile_photo(80); break; case 's': $resolution = 6; - $default = 'images/default_profile_photos/rainbow_man/48.jpg'; + $default = get_default_profile_photo(48); break; case 'l': default: @@ -135,15 +143,15 @@ function photo_init(&$a) { switch($resolution) { case 4: - $data = file_get_contents('images/default_profile_photos/rainbow_man/175.jpg'); + $data = file_get_contents(get_default_profile_photo()); $mimetype = 'image/jpeg'; break; case 5: - $data = file_get_contents('images/default_profile_photos/rainbow_man/80.jpg'); + $data = file_get_contents(get_default_profile_photo(80)); $mimetype = 'image/jpeg'; break; case 6: - $data = file_get_contents('images/default_profile_photos/rainbow_man/48.jpg'); + $data = file_get_contents(get_default_profile_photo(48)); $mimetype = 'image/jpeg'; break; default: |