diff options
author | Brion Vibber <brion@pobox.com> | 2010-06-29 08:53:05 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-06-29 08:53:05 -0700 |
commit | c038164c0f41ba5c33f578f395c9fede80d96db8 (patch) | |
tree | 1452f6e5ae5786048a5a2835275c553e80c60462 /classes/Profile.php | |
parent | 7b7f09195a8082c8e26e87f7deb8b1002b852689 (diff) | |
parent | 452123916d08354d11a198517cbc91980a113fcd (diff) |
Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'classes/Profile.php')
-rw-r--r-- | classes/Profile.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/classes/Profile.php b/classes/Profile.php index 54f557ea7..a303469e9 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -849,15 +849,23 @@ class Profile extends Memcached_DataObject * * Assumes that Atom has been previously set up as the base namespace. * + * @param Profile $cur the current authenticated user + * * @return string */ - function asAtomAuthor() + function asAtomAuthor($cur = null) { $xs = new XMLStringer(true); $xs->elementStart('author'); $xs->element('name', null, $this->nickname); $xs->element('uri', null, $this->getUri()); + if ($cur != null) { + $attrs = Array(); + $attrs['following'] = $cur->isSubscribed($this) ? 'true' : 'false'; + $attrs['blocking'] = $cur->hasBlocked($this) ? 'true' : 'false'; + $xs->element('statusnet:profile_info', $attrs, null); + } $xs->elementEnd('author'); return $xs->getString(); |