X-Git-Url: https://git.mxchange.org/?p=quix0rs-gnu-social.git;a=blobdiff_plain;f=actions%2Fconversation.php;fp=actions%2Fconversation.php;h=84178982e61e01b6a32725e5931338c3e5195ca7;hp=3b6f48c853f59a976d22e7340616f11e67e87162;hb=4160a3fb730113f3d712bd777884c4b0482f6df1;hpb=abd90bbdf562614755802885dfb5673645df8575 diff --git a/actions/conversation.php b/actions/conversation.php index 3b6f48c853..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,14 +75,14 @@ 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(); } Event::handle('EndShowConversation', array($this, $this->conv, $this->scoped)); } - function isReadOnly() + function isReadOnly($args) { return true; } @@ -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,11 +109,11 @@ 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. - _('Conversation feed (Activity Streams JSON)'))); + _('Conversation feed (Atom)'))); } }