summaryrefslogtreecommitdiff
path: root/actions/conversation.php
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2009-06-26 15:31:42 +0800
committerJeffery To <jeffery.to@gmail.com>2009-06-26 15:31:42 +0800
commit6328add622641e5f5721cc34d27d4d872c86a561 (patch)
tree31be2d91646bc3deed194f7c7e8ad64c9ee17971 /actions/conversation.php
parent6d308f6ffe3f894c60fafaea3ceaef86d30dfe1d (diff)
parent97ee517680979bf12e82eab99ecf943712fe97c9 (diff)
Merge branch '0.8.x' into invite-enabled
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);
}