aboutsummaryrefslogtreecommitdiff
path: root/mod/profile/actions/iconupload.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-17 09:45:23 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-17 09:45:23 +0000
commit71d3cdc4f8b21cfa8ffd69746b80bfe18ed54c18 (patch)
tree8af800eb7da9e2c2826491ede08abd80e2b68e9c /mod/profile/actions/iconupload.php
parente529507118a057b908016b823f4307661f861ee7 (diff)
downloadelgg-71d3cdc4f8b21cfa8ffd69746b80bfe18ed54c18.tar.gz
elgg-71d3cdc4f8b21cfa8ffd69746b80bfe18ed54c18.tar.bz2
Fixed #33 - all profile icons except for the largest size are cropped to squares. Additionally, the image resampling functions now take an extra boolean parameter to specify squareness (or not).
git-svn-id: https://code.elgg.org/elgg/trunk@943 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/profile/actions/iconupload.php')
-rw-r--r--mod/profile/actions/iconupload.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/mod/profile/actions/iconupload.php b/mod/profile/actions/iconupload.php
index 7c7e95f37..a6e35e4f8 100644
--- a/mod/profile/actions/iconupload.php
+++ b/mod/profile/actions/iconupload.php
@@ -15,10 +15,10 @@
isloggedin()
) {
- $tiny = get_resized_image_from_uploaded_file('profileicon',25,25);
- $small = get_resized_image_from_uploaded_file('profileicon',50,50);
- $medium = get_resized_image_from_uploaded_file('profileicon',100,100);
- $large = get_resized_image_from_uploaded_file('profileicon',300,300);
+ $tiny = get_resized_image_from_uploaded_file('profileicon',25,25, true);
+ $small = get_resized_image_from_uploaded_file('profileicon',40,40, true);
+ $medium = get_resized_image_from_uploaded_file('profileicon',100,100, true);
+ $large = get_resized_image_from_uploaded_file('profileicon',200,200);
if ($small !== false
&& $medium !== false
@@ -40,7 +40,7 @@
$filehandler->close();
$filehandler->setFilename("profile/" . $_SESSION['user']->username . "tiny.jpg");
$filehandler->open("write");
- $filehandler->write($small);
+ $filehandler->write($tiny);
$filehandler->close();
$_SESSION['user']->icontime = time();