summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMeitar Moscovitz <meitarm@gmail.com>2009-01-29 14:56:22 -0500
committerEvan Prodromou <git@evanprodromou.name>2009-01-29 14:56:22 -0500
commit5543cd21c6ff323f3af427c77b1e1824e5677298 (patch)
tree123ebf9f815165ba54744bebb9b775fc911cdb4a
parent440d7d17b0cc86996132dac3f4b23d69ac60968f (diff)
Fix problems when crop controls not touched
-rw-r--r--actions/grouplogo.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/actions/grouplogo.php b/actions/grouplogo.php
index 11489691e..ba9cdfe2a 100644
--- a/actions/grouplogo.php
+++ b/actions/grouplogo.php
@@ -380,11 +380,6 @@ class GrouplogoAction extends Action
$profile = $user->getProfile();
- $x = $this->arg('avatar_crop_x');
- $y = $this->arg('avatar_crop_y');
- $w = $this->arg('avatar_crop_w');
- $h = $this->arg('avatar_crop_h');
-
$filedata = $_SESSION['FILEDATA'];
if (!$filedata) {
@@ -392,6 +387,11 @@ class GrouplogoAction extends Action
return;
}
+ $x = $this->arg('avatar_crop_x');
+ $y = $this->arg('avatar_crop_y');
+ $w = ($this->arg('avatar_crop_w')) ? $this->arg('avatar_crop_w') : $filedata['width'];
+ $h = ($this->arg('avatar_crop_h')) ? $this->arg('avatar_crop_h') : $filedata['height'];
+
$filepath = common_avatar_path($filedata['filename']);
if (!file_exists($filepath)) {