]> git.mxchange.org Git - friendica.git/blobdiff - include/conversation.php
removed one line too much
[friendica.git] / include / conversation.php
index 4a9d799d2691bf60b81cb75aca1c142b87dff7ca..324b53b5a880410584f5695a48b15c4798f17188 100644 (file)
@@ -433,7 +433,6 @@ These Fields are not added below (yet). They are here to for bug search.
 `item`.`bookmark`,
 `item`.`unseen`,
 `item`.`deleted`,
-`item`.`origin`,
 `item`.`forum_mode`,
 `item`.`mention`,
 `item`.`global`,
@@ -446,7 +445,7 @@ These Fields are not added below (yet). They are here to for bug search.
                `item`.`uri`, `item`.`thr-parent`, `item`.`parent-uri`, `item`.`content-warning`,
                `item`.`commented`, `item`.`created`, `item`.`edited`, `item`.`received`,
                `item`.`verb`, `item`.`object-type`, `item`.`postopts`, `item`.`plink`,
-               `item`.`guid`, `item`.`wall`, `item`.`private`, `item`.`starred`,
+               `item`.`guid`, `item`.`wall`, `item`.`private`, `item`.`starred`, `item`.`origin`,
                `item`.`title`, `item`.`body`, `item`.`file`, `item`.`event-id`,
                `item`.`location`, `item`.`coord`, `item`.`app`, `item`.`attach`,
                `item`.`rendered-hash`, `item`.`rendered-html`, `item`.`object`,
@@ -473,7 +472,7 @@ function item_joins() {
        return sprintf("STRAIGHT_JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
                AND NOT `contact`.`blocked`
                AND ((NOT `contact`.`readonly` AND NOT `contact`.`pending` AND (`contact`.`rel` IN (%s, %s)))
-               OR `contact`.`self` OR (`item`.`id` != `item`.`parent`))
+               OR `contact`.`self` OR (`item`.`id` != `item`.`parent`) OR `contact`.`uid` = 0)
                INNER JOIN `contact` AS `author` ON `author`.`id`=`item`.`author-id` AND NOT `author`.`blocked`
                INNER JOIN `contact` AS `owner` ON `owner`.`id`=`item`.`owner-id` AND NOT `owner`.`blocked`
                LEFT JOIN `event` ON `event-id` = `event`.`id`",
@@ -902,7 +901,7 @@ function conversation_add_children($parents, $block_authors, $order) {
        foreach ($parents AS $parent) {
                $thread_items = dba::p(item_query()."AND `item`.`parent-uri` = ?
                        AND `item`.`uid` IN (0, ?) $block_sql
-                       ORDER BY `item`.`commented` DESC" . $limit,
+                       ORDER BY `item`.`uid` ASC, `item`.`commented` DESC" . $limit,
                        $parent['uri'], local_user());
 
                $comments = dba::inArray($thread_items);