aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profile_photo.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-09 03:40:53 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-09 03:40:53 -0700
commit918aaa64e21db84df17607c42d93e5c7bddd3e08 (patch)
treeaa29d402c60fccfd85366b3f77947c18f8a58d8d /mod/profile_photo.php
parent0a051ff2cd13eb33ecffc3c4e34a1a56a3fcf29a (diff)
downloadvolse-hubzilla-918aaa64e21db84df17607c42d93e5c7bddd3e08.tar.gz
volse-hubzilla-918aaa64e21db84df17607c42d93e5c7bddd3e08.tar.bz2
volse-hubzilla-918aaa64e21db84df17607c42d93e5c7bddd3e08.zip
profile photo issues #36
Diffstat (limited to 'mod/profile_photo.php')
-rw-r--r--mod/profile_photo.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/mod/profile_photo.php b/mod/profile_photo.php
index 9f57c3b9d..7564a3f69 100644
--- a/mod/profile_photo.php
+++ b/mod/profile_photo.php
@@ -238,16 +238,19 @@ function profile_photo_post(&$a) {
notice( t('Image upload failed.') . EOL );
return;
}
+ $os_storage = false;
+
foreach($i as $ii) {
if(intval($ii['scale']) < 2) {
$smallest = intval($ii['scale']);
+ $os_storage = intval($ii['os_storage']);
$imagedata = $ii['data'];
$filetype = $ii['type'];
}
}
}
-// $imagedata = @file_get_contents($src);
+ $imagedata = (($os_storage) ? @file_get_contents($imagedata) : $imagedata);
$ph = photo_factory($imagedata, $filetype);
if(! $ph->is_valid()) {