diff options
author | redmatrix <git@macgirvin.com> | 2016-06-27 22:25:37 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-06-27 22:25:37 -0700 |
commit | 7d7f43c2056fd50ff26aed5df553bf4936ead196 (patch) | |
tree | 8aa181cc6c1c60a803178976be03ddfa1981b7d1 /Zotlabs/Module | |
parent | 30a5fe30617ef19d7cb896783442d43277ce5a8e (diff) | |
download | volse-hubzilla-7d7f43c2056fd50ff26aed5df553bf4936ead196.tar.gz volse-hubzilla-7d7f43c2056fd50ff26aed5df553bf4936ead196.tar.bz2 volse-hubzilla-7d7f43c2056fd50ff26aed5df553bf4936ead196.zip |
still working through some issues with curl magic-auth
fixed profile photo upload
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Cover_photo.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Profile_photo.php | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/Zotlabs/Module/Cover_photo.php b/Zotlabs/Module/Cover_photo.php index 9887b8203..886958b37 100644 --- a/Zotlabs/Module/Cover_photo.php +++ b/Zotlabs/Module/Cover_photo.php @@ -50,7 +50,7 @@ class Cover_photo extends \Zotlabs\Web\Controller { check_form_security_token_redirectOnErr('/cover_photo', 'cover_photo'); - if((x($_POST,'cropfinal')) && ($_POST['cropfinal'] == 1)) { + if((array_key_exists('cropfinal',$_POST)) && ($_POST['cropfinal'] == 1)) { // phase 2 - we have finished cropping diff --git a/Zotlabs/Module/Profile_photo.php b/Zotlabs/Module/Profile_photo.php index 62c5e99ae..9359b80f8 100644 --- a/Zotlabs/Module/Profile_photo.php +++ b/Zotlabs/Module/Profile_photo.php @@ -53,7 +53,7 @@ class Profile_photo extends \Zotlabs\Web\Controller { check_form_security_token_redirectOnErr('/profile_photo', 'profile_photo'); - if((array_key_exists('postfinal',$_POST)) && (intval($_POST['cropfinal']) == 1)) { + if((array_key_exists('cropfinal',$_POST)) && (intval($_POST['cropfinal']) == 1)) { // phase 2 - we have finished cropping @@ -90,12 +90,11 @@ class Profile_photo extends \Zotlabs\Web\Controller { $srcY = $_POST['ystart']; $srcW = $_POST['xfinal'] - $srcX; $srcH = $_POST['yfinal'] - $srcY; - + $r = q("SELECT * FROM photo WHERE resource_id = '%s' AND uid = %d AND imgscale = %d LIMIT 1", dbesc($image_id), dbesc(local_channel()), intval($scale)); - if($r) { $base_image = $r[0]; |