var $page = null;
var $notices = null;
- /**
- * Initialization.
- *
- * @param array $args Web and URL arguments
- *
- * @return boolean false if id not passed in
- */
- protected function prepare(array $args=array())
+ protected function doPreparation()
{
- parent::prepare($args);
- $convId = $this->int('id');
-
- $this->conv = Conversation::getKV('id', $convId);
- if (!$this->conv instanceof Conversation) {
- throw new ClientException('Could not find specified conversation');
- }
-
- return true;
+ $this->conv = Conversation::getByID($this->int('id'));
}
/**
function showContent()
{
if (Event::handle('StartShowConversation', array($this, $this->conv, $this->scoped))) {
- $notices = $this->conv->getNotices();
+ $notices = $this->conv->getNotices($this->scoped);
$nl = new FullThreadedNoticeList($notices, $this, $this->scoped);
$cnt = $nl->show();
}
return array(new Feed(Feed::JSON,
common_local_url('apiconversation',
array(
- 'id' => $this->conv->id,
+ 'id' => $this->conv->getID(),
'format' => 'as')),
// TRANS: Title for link to notice feed.
// TRANS: %s is a user nickname.
new Feed(Feed::RSS2,
common_local_url('apiconversation',
array(
- 'id' => $this->conv->id,
+ 'id' => $this->conv->getID(),
'format' => 'rss')),
// TRANS: Title for link to notice feed.
// TRANS: %s is a user nickname.
new Feed(Feed::ATOM,
common_local_url('apiconversation',
array(
- 'id' => $this->conv->id,
+ 'id' => $this->conv->getID(),
'format' => 'atom')),
// TRANS: Title for link to notice feed.
// TRANS: %s is a user nickname.