diff options
author | Brion Vibber <brion@pobox.com> | 2010-06-26 10:16:27 -0400 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-06-26 10:16:27 -0400 |
commit | d9e56e15cc3174093fc994e524d1d9cf402ae8a3 (patch) | |
tree | ba673d3417cca00b2db1e7d2c1bd7697f9712215 /classes/Profile.php | |
parent | b66709215309126969104ad114874360785f3d57 (diff) | |
parent | 9eb5a976b03fae6bd1e1fce6abfe4a6c7964d1ae (diff) |
Merge branch 'master' into testing
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(); |