Merge commit 'refs/merge-requests/27' of https://gitorious.org/social/mainline into merge-requests/27

This commit is contained in:
Mikael Nordfeldth 2014-12-09 13:30:47 +01:00
commit 6b48db2539
1 changed files with 8 additions and 2 deletions

View File

@ -1271,10 +1271,16 @@ class Notice extends Managed_DataObject
}
// If this isn't a reply to anything, then it's its own
// root.
// root if it's the earliest notice in the conversation:
if (empty($this->reply_to)) {
return $this;
$root = new Notice;
$root->conversation = $this->conversation;
$root->orderBy('notice.created ASC');
$root->find();
$root->fetch();
$root->free();
return $root;
}
if (is_null($profile)) {