aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorMikael Nordfeldth <mmn@hethane.se>2016-01-06 13:58:46 +0100
committerMikael Nordfeldth <mmn@hethane.se>2016-01-06 13:58:46 +0100
commit0fd2ad649e8572b10102ff2e14861e7558685c69 (patch)
tree809a8f6d3d3aa6b4e9590d93e28a7c88a5d2db67 /actions
parent4b22b0c42a11f3e5d853a422fe289a2d9b56fc60 (diff)
downloadgnu-social-0fd2ad649e8572b10102ff2e14861e7558685c69.tar
gnu-social-0fd2ad649e8572b10102ff2e14861e7558685c69.zip
Conversation IDs (again) no longer based on Notice ID
Diffstat (limited to 'actions')
-rw-r--r--actions/conversation.php27
1 files changed, 6 insertions, 21 deletions
diff --git a/actions/conversation.php b/actions/conversation.php
index b1cb50abac..84178982e6 100644
--- a/actions/conversation.php
+++ b/actions/conversation.php
@@ -49,24 +49,9 @@ class ConversationAction extends ManagedAction
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'));
}
/**
@@ -90,7 +75,7 @@ class ConversationAction extends ManagedAction
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();
}
@@ -108,7 +93,7 @@ class ConversationAction extends ManagedAction
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.
@@ -116,7 +101,7 @@ class ConversationAction extends ManagedAction
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.
@@ -124,7 +109,7 @@ class ConversationAction extends ManagedAction
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.