Cool bug! Technically good PHP syntax

This commit is contained in:
Evan Prodromou 2010-02-20 11:17:54 -05:00
parent 2df3bbc80b
commit ed45df045f

View File

@ -149,7 +149,6 @@ class Ostatus_profile extends Memcached_DataObject
function asActivityNoun($element) function asActivityNoun($element)
{ {
$xs = new XMLStringer(true); $xs = new XMLStringer(true);
$avatarHref = Avatar::defaultImage(AVATAR_PROFILE_SIZE); $avatarHref = Avatar::defaultImage(AVATAR_PROFILE_SIZE);
$avatarType = 'image/png'; $avatarType = 'image/png';
if ($this->isGroup()) { if ($this->isGroup()) {
@ -173,8 +172,8 @@ class Ostatus_profile extends Memcached_DataObject
$self = $this->localProfile(); $self = $this->localProfile();
$avatar = $self->getAvatar(AVATAR_PROFILE_SIZE); $avatar = $self->getAvatar(AVATAR_PROFILE_SIZE);
if ($avatar) { if ($avatar) {
$avatarHref = $avatar-> $avatarHref = $avatar->url;
$avatarType = $avatar->mediatype; $avatarType = $avatar->mediatype;
} }
} }
$xs->elementStart('activity:' . $element); $xs->elementStart('activity:' . $element);
@ -672,10 +671,10 @@ class Ostatus_profile extends Memcached_DataObject
// Get the canonical feed URI and check it // Get the canonical feed URI and check it
$discover = new FeedDiscovery(); $discover = new FeedDiscovery();
$feeduri = $discover->discoverFromURL($homeuri); $feeduri = $discover->discoverFromURL($homeuri);
$huburi = $discover->getAtomLink('hub'); $huburi = $discover->getAtomLink('hub');
$salmonuri = $discover->getAtomLink('salmon'); $salmonuri = $discover->getAtomLink('salmon');
if (!$huburi) { if (!$huburi) {
// We can only deal with folks with a PuSH hub // We can only deal with folks with a PuSH hub
throw new FeedSubNoHubException(); throw new FeedSubNoHubException();