X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fconversation.php;h=900a724ef302ac2c14c3be8f9003dc8e0e3f4dd1;hb=9498a164805892a8af17311f7e7697b132524990;hp=79197da2d0a8484c0dcffebba673bae4b9acd0d0;hpb=190d45cd05a1affbc8d0db50a487b5081f6a34cb;p=quix0rs-gnu-social.git diff --git a/actions/conversation.php b/actions/conversation.php index 79197da2d0..900a724ef3 100644 --- a/actions/conversation.php +++ b/actions/conversation.php @@ -5,13 +5,13 @@ * PHP version 5 * * @category Action - * @package Laconica - * @author Evan Prodromou + * @package StatusNet + * @author Evan Prodromou * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 - * @link http://laconi.ca/ + * @link http://status.net/ * - * Laconica - a distributed open-source microblogging tool - * Copyright (C) 2009, Control Yourself, Inc. + * StatusNet - the distributed open-source microblogging tool + * Copyright (C) 2009, StatusNet, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -27,20 +27,23 @@ * along with this program. If not, see . */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +// XXX: not sure how to do paging yet, +// so set a 60-notice limit + require_once INSTALLDIR.'/lib/noticelist.php'; /** * Conversation tree in the browser * * @category Action - * @package Laconica - * @author Evan Prodromou + * @package StatusNet + * @author Evan Prodromou * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 - * @link http://laconi.ca/ + * @link http://status.net/ */ class ConversationAction extends Action @@ -107,12 +110,17 @@ class ConversationAction extends Action function showContent() { - $notices = Notice::conversationStream($this->id); + $notices = Notice::conversationStream($this->id, null, null); $ct = new ConversationTree($notices, $this); $cnt = $ct->show(); } + + function isReadOnly() + { + return true; + } } /** @@ -121,10 +129,10 @@ class ConversationAction extends Action * The widget class for displaying a hierarchical list of notices. * * @category Widget - * @package Laconica - * @author Evan Prodromou + * @package StatusNet + * @author Evan Prodromou * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 - * @link http://laconi.ca/ + * @link http://status.net/ */ class ConversationTree extends NoticeList @@ -140,9 +148,7 @@ class ConversationTree extends NoticeList function show() { - $cnt = 0; - - $this->_buildTree(); + $cnt = $this->_buildTree(); $this->out->elementStart('div', array('id' =>'notices_primary')); $this->out->element('h2', null, _('Notices')); @@ -161,6 +167,8 @@ class ConversationTree extends NoticeList function _buildTree() { + $cnt = 0; + $this->tree = array(); $this->table = array(); @@ -181,6 +189,8 @@ class ConversationTree extends NoticeList $this->tree[$notice->reply_to] = array($notice->id); } } + + return $cnt; } /** @@ -240,10 +250,10 @@ class ConversationTree extends NoticeList * Special class of NoticeListItem for use inside conversation trees. * * @category Widget - * @package Laconica - * @author Evan Prodromou + * @package StatusNet + * @author Evan Prodromou * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 - * @link http://laconi.ca/ + * @link http://status.net/ */ class ConversationTreeItem extends NoticeListItem