summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-30 11:50:16 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-06-30 11:50:16 -0400
commit4e6cd427577f55e024fac26b5cdab6c15ba9f97f (patch)
treef5b24ba13e77fe643abb76ffdeab0ca124ecf40f /actions
parent424dd56b2aa4685e30970685079275098807e572 (diff)
conversation code changes
Diffstat (limited to 'actions')
-rw-r--r--actions/conversation.php41
1 files changed, 20 insertions, 21 deletions
diff --git a/actions/conversation.php b/actions/conversation.php
index 654a670f5..79197da2d 100644
--- a/actions/conversation.php
+++ b/actions/conversation.php
@@ -107,17 +107,11 @@ class ConversationAction extends Action
function showContent()
{
- $offset = ($this->page-1) * NOTICES_PER_PAGE;
- $limit = NOTICES_PER_PAGE + 1;
-
- $notices = Notice::conversationStream($this->id, $offset, $limit);
+ $notices = Notice::conversationStream($this->id);
$ct = new ConversationTree($notices, $this);
$cnt = $ct->show();
-
- $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE,
- $this->page, 'conversation', array('id' => $this->id));
}
}
@@ -148,6 +142,25 @@ class ConversationTree extends NoticeList
{
$cnt = 0;
+ $this->_buildTree();
+
+ $this->out->elementStart('div', array('id' =>'notices_primary'));
+ $this->out->element('h2', null, _('Notices'));
+ $this->out->elementStart('ol', array('class' => 'notices xoxo'));
+
+ if (array_key_exists('root', $this->tree)) {
+ $rootid = $this->tree['root'][0];
+ $this->showNoticePlus($rootid);
+ }
+
+ $this->out->elementEnd('ol');
+ $this->out->elementEnd('div');
+
+ return $cnt;
+ }
+
+ function _buildTree()
+ {
$this->tree = array();
$this->table = array();
@@ -168,20 +181,6 @@ class ConversationTree extends NoticeList
$this->tree[$notice->reply_to] = array($notice->id);
}
}
-
- $this->out->elementStart('div', array('id' =>'notices_primary'));
- $this->out->element('h2', null, _('Notices'));
- $this->out->elementStart('ol', array('class' => 'notices xoxo'));
-
- if (array_key_exists('root', $this->tree)) {
- $rootid = $this->tree['root'][0];
- $this->showNoticePlus($rootid);
- }
-
- $this->out->elementEnd('ol');
- $this->out->elementEnd('div');
-
- return $cnt;
}
/**