From 343cd6f20577c44487eae4e90ec10bfd954980e3 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 6 Feb 2009 03:13:08 -0500 Subject: Move common_avatar_* functions to Avatar Moved the common_avatar_* functions to the Avatar class. Typically either as methods on the object or as static methods. Replaced all the uses of the functions in other modules. --- actions/avatarsettings.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'actions/avatarsettings.php') diff --git a/actions/avatarsettings.php b/actions/avatarsettings.php index 3f50ca24c..a0be5d8f8 100644 --- a/actions/avatarsettings.php +++ b/actions/avatarsettings.php @@ -200,7 +200,7 @@ class AvatarsettingsAction extends AccountSettingsAction 'class' => 'avatar_view')); $this->element('h2', null, _("Original")); $this->elementStart('div', array('id'=>'avatar_original_view')); - $this->element('img', array('src' => common_avatar_url($this->filedata['filename']), + $this->element('img', array('src' => Avatar::url($this->filedata['filename']), 'width' => $this->filedata['width'], 'height' => $this->filedata['height'], 'alt' => $user->nickname)); @@ -212,7 +212,7 @@ class AvatarsettingsAction extends AccountSettingsAction 'class' => 'avatar_view')); $this->element('h2', null, _("Preview")); $this->elementStart('div', array('id'=>'avatar_preview_view')); - $this->element('img', array('src' => common_avatar_url($this->filedata['filename']), + $this->element('img', array('src' => Avatar::url($this->filedata['filename']), 'width' => AVATAR_PROFILE_SIZE, 'height' => AVATAR_PROFILE_SIZE, 'alt' => $user->nickname)); @@ -281,12 +281,12 @@ class AvatarsettingsAction extends AccountSettingsAction $cur = common_current_user(); - $filename = common_avatar_filename($cur->id, + $filename = Avatar::filename($cur->id, image_type_to_extension($imagefile->type), null, 'tmp'.common_timestamp()); - $filepath = common_avatar_path($filename); + $filepath = Avatar::path($filename); move_uploaded_file($imagefile->filepath, $filepath); -- cgit v1.2.3-54-g00ecf