X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fatomnoticefeed.php;h=292bc97e8584ccfe0819bb93522d175051a5451d;hb=4e26527447852f88d48bf40a4f208079fcb77a49;hp=b8821729185fa2eb800331b4b26c9d948d5e9c80;hpb=819d33210d298de74b64dc7ead79e9d9b223b12e;p=quix0rs-gnu-social.git diff --git a/lib/atomnoticefeed.php b/lib/atomnoticefeed.php index b882172918..292bc97e85 100644 --- a/lib/atomnoticefeed.php +++ b/lib/atomnoticefeed.php @@ -45,6 +45,7 @@ if (!defined('STATUSNET')) class AtomNoticeFeed extends Atom10Feed { var $cur; + protected $scoped=null; /** * Constructor - adds a bunch of XML namespaces we need in our @@ -58,7 +59,8 @@ class AtomNoticeFeed extends Atom10Feed function __construct($cur = null, $indent = true) { parent::__construct($indent); - $this->cur = $cur; + $this->cur = $cur ?: common_current_user(); + $this->scoped = !is_null($this->cur) ? $this->cur->getProfile() : null; // Feeds containing notice info use these namespaces @@ -129,9 +131,7 @@ class AtomNoticeFeed extends Atom10Feed $source = $this->showSource(); $author = $this->showAuthor(); - $cur = empty($this->cur) ? common_current_user() : $this->cur; - - $this->addEntryRaw($notice->asAtomEntry(false, $source, $author, $cur)); + $this->addEntryRaw($notice->asAtomEntry(false, $source, $author, $this->scoped)); } catch (Exception $e) { common_log(LOG_ERR, $e->getMessage()); // we continue on exceptions