/**
* StatusNet, the distributed open-source microblogging tool
*
- * Class for building and Atom feed from a collection of notices
+ * Class for building an Atom feed from a collection of notices
*
* PHP version 5
*
* @link http://status.net/
*/
-if (!defined('STATUSNET')
+if (!defined('STATUSNET'))
{
exit(1);
}
// Feeds containing notice info use these namespaces
$this->addNamespace(
- 'xmlns:thr',
+ 'thr',
'http://purl.org/syndication/thread/1.0'
);
$this->addNamespace(
- 'xmlns:georss',
+ 'georss',
'http://www.georss.org/georss'
);
$this->addNamespace(
- 'xmlns:activity',
+ 'activity',
'http://activitystrea.ms/spec/1.0/'
);
+ $this->addNamespace(
+ 'media',
+ 'http://purl.org/syndication/atommedia'
+ );
+
+ $this->addNamespace(
+ 'poco',
+ 'http://portablecontacts.net/spec/1.0'
+ );
+
// XXX: What should the uri be?
$this->addNamespace(
- 'xmlns:ostatus',
+ 'ostatus',
'http://ostatus.org/schema/1.0'
);
}
}
} else {
while ($notices->fetch()) {
- $this->addEntryFromNotice($notice);
+ $this->addEntryFromNotice($notices);
}
}
}
*/
function addEntryFromNotice($notice)
{
- $this->addEntryRaw($notice->asAtomEntry());
+ $source = $this->showSource();
+ $author = $this->showAuthor();
+
+ $this->addEntryRaw($notice->asAtomEntry(false, $source, $author));
+ }
+
+ function showSource()
+ {
+ return true;
}
+ function showAuthor()
+ {
+ return true;
+ }
}