aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profile_photo.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-22 17:48:42 -0800
committerfriendica <info@friendica.com>2013-01-22 17:48:42 -0800
commitcf2488e999944ca1135ac62955527a376ad0eac2 (patch)
treec9f2981c7c340b66fe5bbc9cc76e7b981deeea45 /mod/profile_photo.php
parentbeb3301d43c0d532bd6984ee745074479babdabb (diff)
downloadvolse-hubzilla-cf2488e999944ca1135ac62955527a376ad0eac2.tar.gz
volse-hubzilla-cf2488e999944ca1135ac62955527a376ad0eac2.tar.bz2
volse-hubzilla-cf2488e999944ca1135ac62955527a376ad0eac2.zip
clean up the photo storage backend, revamp mod/wall_upload
Diffstat (limited to 'mod/profile_photo.php')
-rw-r--r--mod/profile_photo.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/mod/profile_photo.php b/mod/profile_photo.php
index d1e24269a..1bee046d1 100644
--- a/mod/profile_photo.php
+++ b/mod/profile_photo.php
@@ -81,8 +81,9 @@ function profile_photo_post(&$a) {
$im = new Photo($base_image['data'], $base_image['type']);
if($im->is_valid()) {
$im->cropImage(175,$srcX,$srcY,$srcW,$srcH);
+ $aid = get_account_id();
- $r = $im->store(local_user(), 0, $base_image['resource_id'],$base_image['filename'],
+ $r = $im->store($aid, local_user(), '', $base_image['resource_id'],$base_image['filename'],
t('Profile Photos'), 4, $is_default_profile);
if($r === false)
@@ -90,7 +91,7 @@ function profile_photo_post(&$a) {
$im->scaleImage(80);
- $r = $im->store(local_user(), 0, $base_image['resource_id'],$base_image['filename'],
+ $r = $im->store($aid, local_user(), '', $base_image['resource_id'],$base_image['filename'],
t('Profile Photos'), 5, $is_default_profile);
if($r === false)
@@ -98,7 +99,7 @@ function profile_photo_post(&$a) {
$im->scaleImage(48);
- $r = $im->store(local_user(), 0, $base_image['resource_id'],$base_image['filename'],
+ $r = $im->store($aid, local_user(), '', $base_image['resource_id'],$base_image['filename'],
t('Profile Photos'), 6, $is_default_profile);
if($r === false)
@@ -308,7 +309,7 @@ function profile_photo_crop_ui_head(&$a, $ph){
$smallest = 0;
- $r = $ph->store(local_user(), 0 , $hash, $filename, t('Profile Photos'), 0 );
+ $r = $ph->store(get_account_id(), local_user(), '', $hash, $filename, t('Profile Photos'), 0 );
if($r)
info( t('Image uploaded successfully.') . EOL );
@@ -317,7 +318,7 @@ function profile_photo_crop_ui_head(&$a, $ph){
if($width > 640 || $height > 640) {
$ph->scaleImage(640);
- $r = $ph->store(local_user(), 0 , $hash, $filename, t('Profile Photos'), 1 );
+ $r = $ph->store(get_account_id(), local_user(), '' , $hash, $filename, t('Profile Photos'), 1 );
if($r === false)
notice( sprintf(t('Image size reduction [%s] failed.'),"640") . EOL );