only update the avatar of an Ostatus_profile if it's a profile

This commit is contained in:
Evan Prodromou 2011-07-04 12:24:59 -04:00
parent 9f8d0b36a8
commit db85774f25
1 changed files with 4 additions and 1 deletions

View File

@ -1045,7 +1045,10 @@ class Ostatus_profile extends Managed_DataObject
chmod(Avatar::path($filename), 0644);
$profile = $this->localProfile();
$profile->setOriginal($filename);
if (!empty($profile)) {
$profile->setOriginal($filename);
}
$orig = clone($this);
$this->avatar = $url;