From 01b6aca078f9665eb01c1b1fbbbe2f4c6340cf9b Mon Sep 17 00:00:00 2001 From: Meitar Moscovitz Date: Wed, 4 Feb 2009 03:34:17 +1100 Subject: [PATCH 1/2] Fix PHP warnings when user avatar crop controls aren'tn touched. --- actions/avatarsettings.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/actions/avatarsettings.php b/actions/avatarsettings.php index 19f53b8828..3029b06211 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)) { From 3b6d2653fb82271771d5889e63275666409b0eb1 Mon Sep 17 00:00:00 2001 From: Meitar Moscovitz Date: Wed, 4 Feb 2009 04:02:30 +1100 Subject: [PATCH 2/2] Fixes ticket:1087; correctly paginate group members list in fancy URLs. --- lib/util.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util.php b/lib/util.php index 07e124811e..8f93a83191 100644 --- a/lib/util.php +++ b/lib/util.php @@ -898,7 +898,7 @@ function common_fancy_url($action, $args=null) case 'grouprss': return common_path('group/'.$args['nickname'].'/rss'); case 'groupmembers': - return common_path('group/'.$args['nickname'].'/members'); + return common_path('group/'.$args['nickname'].'/members' . (($args['page']) ? ('?page=' . $args['page']) : '')); case 'grouplogo': return common_path('group/'.$args['nickname'].'/logo'); case 'usergroups':