X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapiconversation.php;h=5e1102b2f6f415928dc1cabd4b05247738083459;hb=7da925ca70c74c3466fd0477403109ed40d02175;hp=504787b9a2da979a07e2e5d9aba3b2cc1ae5223b;hpb=59043dca7fb6f974b11797c4d0f20e5b78b0611d;p=quix0rs-gnu-social.git diff --git a/actions/apiconversation.php b/actions/apiconversation.php index 504787b9a2..5e1102b2f6 100644 --- a/actions/apiconversation.php +++ b/actions/apiconversation.php @@ -34,8 +34,6 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/apiauth.php'; - /** * Show a stream of notices in a particular conversation * @@ -51,16 +49,9 @@ class ApiconversationAction extends ApiAuthAction protected $conversation = null; protected $notices = null; - /** - * For initializing members of the class. - * - * @param array $argarray misc. arguments - * - * @return boolean true - */ - function prepare($argarray) + protected function prepare(array $args=array()) { - parent::prepare($argarray); + parent::prepare($args); $convId = $this->trimmed('id'); @@ -69,7 +60,7 @@ class ApiconversationAction extends ApiAuthAction throw new ClientException(_('No conversation ID.')); } - $this->conversation = Conversation::staticGet('id', $convId); + $this->conversation = Conversation::getKV('id', $convId); if (empty($this->conversation)) { // TRANS: Client exception thrown when referring to a non-existing conversation ID (%d). @@ -77,9 +68,7 @@ class ApiconversationAction extends ApiAuthAction 404); } - $profile = Profile::current(); - - $stream = new ConversationNoticeStream($convId, $profile); + $stream = new ConversationNoticeStream($convId, $this->scoped); $notice = $stream->getNotices(($this->page-1) * $this->count, $this->count,