ImageFile $id argument is only for File objects
Remember to eliminate the Avatar/group logo call to ImageFile->resize!
This commit is contained in:
parent
6f76c8b59d
commit
2a32af084f
@ -374,7 +374,7 @@ class AvatarsettingsAction extends SettingsAction
|
||||
$user = common_current_user();
|
||||
$profile = $user->getProfile();
|
||||
|
||||
$imagefile = new ImageFile($user->id, $filedata['filepath']);
|
||||
$imagefile = new ImageFile(null, $filedata['filepath']);
|
||||
$filename = $imagefile->resize($size, $dest_x, $dest_y, $dest_w, $dest_h);
|
||||
|
||||
if ($profile->setOriginal($filename)) {
|
||||
|
@ -393,7 +393,7 @@ class GrouplogoAction extends GroupAction
|
||||
$size = min($dest_w, $dest_h);
|
||||
$size = ($size > MAX_ORIGINAL) ? MAX_ORIGINAL:$size;
|
||||
|
||||
$imagefile = new ImageFile($this->group->id, $filedata['filepath']);
|
||||
$imagefile = new ImageFile(null, $filedata['filepath']);
|
||||
$filename = $imagefile->resize($size, $dest_x, $dest_y, $dest_w, $dest_h);
|
||||
|
||||
if ($this->group->setOriginal($filename)) {
|
||||
|
@ -80,7 +80,7 @@ class Oauth_application extends Managed_DataObject
|
||||
|
||||
function setOriginal($filename)
|
||||
{
|
||||
$imagefile = new ImageFile($this->id, Avatar::path($filename));
|
||||
$imagefile = new ImageFile(null, Avatar::path($filename));
|
||||
|
||||
// XXX: Do we want to have a bunch of different size icons? homepage, stream, mini?
|
||||
// or just one and control size via CSS? --Zach
|
||||
|
@ -312,7 +312,7 @@ class User_group extends Managed_DataObject
|
||||
|
||||
function setOriginal($filename)
|
||||
{
|
||||
$imagefile = new ImageFile($this->id, Avatar::path($filename));
|
||||
$imagefile = new ImageFile(null, Avatar::path($filename));
|
||||
|
||||
$orig = clone($this);
|
||||
$this->original_logo = Avatar::url($filename);
|
||||
|
@ -436,7 +436,7 @@ class FacebookfinishloginAction extends Action
|
||||
} else {
|
||||
// save it as an avatar
|
||||
|
||||
$file = new ImageFile($user->id, Avatar::path($tmpname));
|
||||
$file = new ImageFile(null, Avatar::path($tmpname));
|
||||
$filename = $file->resize(180); // size of the biggest img we get from Facebook
|
||||
|
||||
$profile = $user->getProfile();
|
||||
|
@ -1268,8 +1268,7 @@ class Ostatus_profile extends Managed_DataObject
|
||||
} else {
|
||||
$id = $this->profile_id;
|
||||
}
|
||||
// @todo FIXME: Should we be using different ids?
|
||||
$imagefile = new ImageFile($id, $temp_filename);
|
||||
$imagefile = new ImageFile(null, $temp_filename);
|
||||
$filename = Avatar::filename($id,
|
||||
image_type_to_extension($imagefile->type),
|
||||
null,
|
||||
|
@ -188,9 +188,7 @@ class WikiHowProfilePlugin extends Plugin
|
||||
|
||||
$profile = $user->getProfile();
|
||||
$id = $profile->id;
|
||||
// @fixme should we be using different ids?
|
||||
|
||||
$imagefile = new ImageFile($id, $temp_filename);
|
||||
$imagefile = new ImageFile(null, $temp_filename);
|
||||
$filename = Avatar::filename($id,
|
||||
image_type_to_extension($imagefile->type),
|
||||
null,
|
||||
|
Loading…
Reference in New Issue
Block a user