summaryrefslogtreecommitdiff
path: root/actions/userauthorization.php
diff options
context:
space:
mode:
authorFederico Marani <federico.marani@ymail.com>2009-03-07 13:54:54 +0000
committerFederico Marani <federico.marani@ymail.com>2009-03-07 13:54:54 +0000
commitbab3e1b8586f42bc1f0a5f96b6990d67c6b74446 (patch)
tree559729d3330991c0c68da96350b71434ca4f6f87 /actions/userauthorization.php
parenta389f157baddafa91347c27194805580b1373e30 (diff)
parent13c183e2f4e0738233658ca79103bbe4a6d57992 (diff)
Merge branch '0.8.x' of git://gitorious.org/laconica/dev into 0.8.x
Conflicts: lib/util.php
Diffstat (limited to 'actions/userauthorization.php')
-rw-r--r--actions/userauthorization.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/actions/userauthorization.php b/actions/userauthorization.php
index 7455a41a6..0dc1841d4 100644
--- a/actions/userauthorization.php
+++ b/actions/userauthorization.php
@@ -105,7 +105,7 @@ class UserauthorizationAction extends Action
$this->elementStart('div', 'profile');
if ($avatar) {
$this->element('img', array('src' => $avatar,
- 'class' => 'avatar profile',
+ 'class' => 'avatar',
'width' => AVATAR_PROFILE_SIZE,
'height' => AVATAR_PROFILE_SIZE,
'alt' => $nickname));
@@ -330,7 +330,13 @@ class UserauthorizationAction extends Action
{
$temp_filename = tempnam(sys_get_temp_dir(), 'listenee_avatar');
copy($url, $temp_filename);
- return $profile->setOriginal($temp_filename);
+ $imagefile = new ImageFile($profile->id, $temp_filename);
+ $filename = Avatar::filename($profile->id,
+ image_type_to_extension($imagefile->type),
+ null,
+ common_timestamp());
+ rename($temp_filename, Avatar::path($filename));
+ return $profile->setOriginal($filename);
}
function showAcceptMessage($tok)