diff options
author | zotlabs <mike@macgirvin.com> | 2018-02-05 15:58:28 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-02-05 15:58:28 -0800 |
commit | b41c5f349715abc6ca7db563e3938336bc75974e (patch) | |
tree | 31a1ee5a74227c30239bb9d2a10341bbacb8ecec /Zotlabs/Module/Profile_photo.php | |
parent | 05de59d4ad174cb106c3a5b5890732af51730384 (diff) | |
parent | 930e1fdbdc798868760f8a4e03f32fc3f42e8bc9 (diff) | |
download | volse-hubzilla-b41c5f349715abc6ca7db563e3938336bc75974e.tar.gz volse-hubzilla-b41c5f349715abc6ca7db563e3938336bc75974e.tar.bz2 volse-hubzilla-b41c5f349715abc6ca7db563e3938336bc75974e.zip |
Merge branch 'master' into z6
Diffstat (limited to 'Zotlabs/Module/Profile_photo.php')
-rw-r--r-- | Zotlabs/Module/Profile_photo.php | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/Zotlabs/Module/Profile_photo.php b/Zotlabs/Module/Profile_photo.php index 45a606d5f..222b92721 100644 --- a/Zotlabs/Module/Profile_photo.php +++ b/Zotlabs/Module/Profile_photo.php @@ -1,10 +1,11 @@ <?php namespace Zotlabs\Module; -/* @file profile_photo.php - @brief Module-file with functions for handling of profile-photos - -*/ +/* + * @file Profile_photo.php + * @brief Module-file with functions for handling of profile-photos + * + */ require_once('include/photo/photo_driver.php'); @@ -55,6 +56,10 @@ class Profile_photo extends \Zotlabs\Web\Controller { if((array_key_exists('cropfinal',$_POST)) && (intval($_POST['cropfinal']) == 1)) { + // logger('crop: ' . print_r($_POST,true)); + + + // phase 2 - we have finished cropping if(argc() != 2) { @@ -86,10 +91,10 @@ class Profile_photo extends \Zotlabs\Web\Controller { } - $srcX = $_POST['xstart']; - $srcY = $_POST['ystart']; - $srcW = $_POST['xfinal'] - $srcX; - $srcH = $_POST['yfinal'] - $srcY; + $srcX = intval($_POST['xstart']); + $srcY = intval($_POST['ystart']); + $srcW = intval($_POST['xfinal']) - $srcX; + $srcH = intval($_POST['yfinal']) - $srcY; $r = q("SELECT * FROM photo WHERE resource_id = '%s' AND uid = %d AND imgscale = %d LIMIT 1", dbesc($image_id), |