summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorMeitar Moscovitz <meitarm@gmail.com>2009-02-04 03:34:17 +1100
committerMeitar Moscovitz <meitarm@gmail.com>2009-02-04 03:34:17 +1100
commit01b6aca078f9665eb01c1b1fbbbe2f4c6340cf9b (patch)
treed80dd1639bd7d6d31c9a05d0a8183560e9dd78ab /actions
parent22c806a15a957c300cb047cb42e8f5c49d47afa9 (diff)
Fix PHP warnings when user avatar crop controls aren'tn touched.
Diffstat (limited to 'actions')
-rw-r--r--actions/avatarsettings.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/actions/avatarsettings.php b/actions/avatarsettings.php
index 19f53b882..3029b0621 100644
--- a/actions/avatarsettings.php
+++ b/actions/avatarsettings.php
@@ -316,11 +316,6 @@ class AvatarsettingsAction extends AccountSettingsAction
$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) {
@@ -328,6 +323,11 @@ class AvatarsettingsAction extends AccountSettingsAction
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)) {