summaryrefslogtreecommitdiff
path: root/actions/conversation.php
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2009-06-26 15:30:24 +0800
committerJeffery To <jeffery.to@gmail.com>2009-06-26 15:30:24 +0800
commit899aad747a466609542388f86bbd22da4360ed6d (patch)
tree55fab97917fe9f304164fb96b0f0a85a4524567d /actions/conversation.php
parent43680ed0c2cf83448d755fa1edff42711d06a82c (diff)
parent97ee517680979bf12e82eab99ecf943712fe97c9 (diff)
Merge branch '0.8.x' into group-rss-empty
Diffstat (limited to 'actions/conversation.php')
-rw-r--r--actions/conversation.php14
1 files changed, 4 insertions, 10 deletions
diff --git a/actions/conversation.php b/actions/conversation.php
index 20c68986c..654a670f5 100644
--- a/actions/conversation.php
+++ b/actions/conversation.php
@@ -63,6 +63,7 @@ class ConversationAction extends Action
if (empty($this->id)) {
return false;
}
+ $this->id = $this->id+0;
$this->page = $this->trimmed('page');
if (empty($this->page)) {
$this->page = 1;
@@ -106,18 +107,10 @@ class ConversationAction extends Action
function showContent()
{
- // FIXME this needs to be a tree, not a list
-
- $qry = 'SELECT * FROM notice WHERE conversation = %s ';
-
$offset = ($this->page-1) * NOTICES_PER_PAGE;
$limit = NOTICES_PER_PAGE + 1;
- $txt = sprintf($qry, $this->id);
-
- $notices = Notice::getStream($txt,
- 'notice:conversation:'.$this->id,
- $offset, $limit);
+ $notices = Notice::conversationStream($this->id, $offset, $limit);
$ct = new ConversationTree($notices, $this);
@@ -126,7 +119,6 @@ class ConversationAction extends Action
$this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE,
$this->page, 'conversation', array('id' => $this->id));
}
-
}
/**
@@ -217,6 +209,8 @@ class ConversationTree extends NoticeList
$this->out->elementStart('ol', array('class' => 'notices'));
+ sort($children);
+
foreach ($children as $child) {
$this->showNoticePlus($child);
}