aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photo.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/photo.php')
-rw-r--r--mod/photo.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/mod/photo.php b/mod/photo.php
index 9302278b6..8cb82e8ff 100644
--- a/mod/photo.php
+++ b/mod/photo.php
@@ -66,12 +66,12 @@ function photo_init(&$a) {
intval($uid)
);
if(count($r)) {
- $data = $r[0]['data'];
+ $data = dbunescbin($r[0]['data']);
$mimetype = $r[0]['type'];
}
if(! isset($data)) {
$data = file_get_contents($default);
- $mimetype = 'image/jpeg';
+ $mimetype = 'image/png';
}
}
else {
@@ -140,7 +140,7 @@ function photo_init(&$a) {
);
if($r && $allowed) {
- $data = $r[0]['data'];
+ $data = dbunescbin($r[0]['data']);
$mimetype = $r[0]['type'];
}
else {
@@ -176,15 +176,15 @@ function photo_init(&$a) {
case 4:
$data = file_get_contents(get_default_profile_photo());
- $mimetype = 'image/jpeg';
+ $mimetype = 'image/png';
break;
case 5:
$data = file_get_contents(get_default_profile_photo(80));
- $mimetype = 'image/jpeg';
+ $mimetype = 'image/png';
break;
case 6:
$data = file_get_contents(get_default_profile_photo(48));
- $mimetype = 'image/jpeg';
+ $mimetype = 'image/png';
break;
default:
killme();