aboutsummaryrefslogtreecommitdiff
path: root/mod/profile/actions
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-23 02:48:17 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-23 02:48:17 +0000
commit4ba95f6d9b85746a5fdae7e9847f096d7d223f02 (patch)
tree9d04c2e356ae7136b5ae08d0ecc50e6d150568fd /mod/profile/actions
parentf7b596b2d27c048df50b9e1b772e7c4aae55be9f (diff)
downloadelgg-4ba95f6d9b85746a5fdae7e9847f096d7d223f02.tar.gz
elgg-4ba95f6d9b85746a5fdae7e9847f096d7d223f02.tar.bz2
Fixes #2418 and merges [7121] into trunk
git-svn-id: http://code.elgg.org/elgg/trunk@7427 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/profile/actions')
-rw-r--r--mod/profile/actions/cropicon.php9
-rw-r--r--mod/profile/actions/iconupload.php2
2 files changed, 8 insertions, 3 deletions
diff --git a/mod/profile/actions/cropicon.php b/mod/profile/actions/cropicon.php
index 1212e8bab..c44cee6bd 100644
--- a/mod/profile/actions/cropicon.php
+++ b/mod/profile/actions/cropicon.php
@@ -22,17 +22,22 @@ $y2 = (int) get_input('y_2',0);
$filehandler = new ElggFile();
$filehandler->owner_guid = $profile_owner->getGUID();
-$filehandler->setFilename("profile/" . $profile_owner->username . "master" . ".jpg");
+$filehandler->setFilename("profile/" . $profile_owner->guid . "master" . ".jpg");
$filename = $filehandler->getFilenameOnFilestore();
$topbar = get_resized_image_from_existing_file($filename, 16, 16, true, $x1, $y1, $x2, $y2, TRUE);
$tiny = get_resized_image_from_existing_file($filename, 25, 25, true, $x1, $y1, $x2, $y2, TRUE);
$small = get_resized_image_from_existing_file($filename, 40, 40, true, $x1, $y1, $x2, $y2, TRUE);
$medium = get_resized_image_from_existing_file($filename, 100, 100, true, $x1, $y1, $x2, $y2, TRUE);
+$large = get_resized_image_from_existing_file($filename, 550, 550, true, $x1, $y1, $x2, $y2);
-if ($small !== FALSE && $medium !== FALSE && $tiny !== FALSE) {
+if ($tiny !== FALSE && $small !== FALSE && $medium !== FALSE && $large !== FALSE) {
$filehandler = new ElggFile();
$filehandler->owner_guid = $profile_owner->getGUID();
+ $filehandler->setFilename("profile/" . $profile_owner->guid . "large.jpg");
+ $filehandler->open("write");
+ $filehandler->write($large);
+ $filehandler->close();
$filehandler->setFilename("profile/" . $profile_owner->guid . "medium.jpg");
$filehandler->open("write");
$filehandler->write($medium);
diff --git a/mod/profile/actions/iconupload.php b/mod/profile/actions/iconupload.php
index f146316f0..d0a3cf28a 100644
--- a/mod/profile/actions/iconupload.php
+++ b/mod/profile/actions/iconupload.php
@@ -24,7 +24,7 @@ $icon_sizes = array(
'small' => array('w'=>40, 'h'=>40, 'square'=>TRUE, 'upscale'=>TRUE),
'medium' => array('w'=>100, 'h'=>100, 'square'=>TRUE, 'upscale'=>TRUE),
'large' => array('w'=>200, 'h'=>200, 'square'=>FALSE, 'upscale'=>FALSE),
- 'master' => array('w'=>1600, 'h'=>1600, 'square'=>FALSE, 'upscale'=>FALSE)
+ 'master' => array('w'=>550, 'h'=>550, 'square'=>FALSE, 'upscale'=>FALSE)
);
// get the images and save their file handlers into an array