* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
* @link http://status.net/
*/
-class ConversationAction extends Action
+class ConversationAction extends ManagedAction
{
var $id = null;
var $page = null;
var $notices = null;
- var $userProfile = null;
const MAX_NOTICES = 500;
*
* @return boolean false if id not passed in
*/
- function prepare($args)
+ protected function prepare(array $args=array())
{
parent::prepare($args);
$this->id = $this->trimmed('id');
$this->page = 1;
}
- $cur = common_current_user();
-
- if (empty($cur)) {
- $this->userProfile = null;
- } else {
- $this->userProfile = $cur->getProfile();
- }
-
- $stream = new ConversationNoticeStream($this->id, $this->userProfile);
+ $stream = new ConversationNoticeStream($this->id, $this->scoped);
$this->notices = $stream->getNotices(0, self::MAX_NOTICES);
return true;
}
- /**
- * Handle the action
- *
- * @param array $args Web and URL arguments
- *
- * @return void
- */
- function handle($args)
- {
- parent::handle($args);
- $this->showPage();
- }
-
/**
* Returns the page title
*
if (!empty($user) && $user->conversationTree()) {
$nl = new ConversationTree($this->notices, $this);
} else {
- $nl = new FullThreadedNoticeList($this->notices, $this, $this->userProfile);
+ $nl = new FullThreadedNoticeList($this->notices, $this, $this->scoped);
}
$cnt = $nl->show();