aboutsummaryrefslogtreecommitdiffstats
path: root/mod/network.php
diff options
context:
space:
mode:
authorTobias Diekershoff <tobias.diekershoff@gmx.net>2011-01-19 15:21:06 +0100
committerTobias Diekershoff <tobias.diekershoff@gmx.net>2011-01-19 15:21:06 +0100
commitd8f9458663f3a8212e98c1d781a06fc22c34e3a2 (patch)
treedfca7346e315bed7c4fcfeb7306b809fdabbc3d8 /mod/network.php
parent468c1824054b7527a3d691e0e404e09c37721711 (diff)
parent766ade06d5e3b387d1fd3d2d0b00b15852e877b1 (diff)
downloadvolse-hubzilla-d8f9458663f3a8212e98c1d781a06fc22c34e3a2.tar.gz
volse-hubzilla-d8f9458663f3a8212e98c1d781a06fc22c34e3a2.tar.bz2
volse-hubzilla-d8f9458663f3a8212e98c1d781a06fc22c34e3a2.zip
Merge branch 'master' of git://github.com/friendika/friendika
Diffstat (limited to 'mod/network.php')
-rw-r--r--mod/network.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/mod/network.php b/mod/network.php
index 5073b8a61..c761af810 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -134,11 +134,14 @@ function network_content(&$a, $update = 0) {
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
`contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`,
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
- FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
+ FROM `item`, (SELECT `p`.`id`,`p`.`created` FROM `item` AS `p` WHERE `p`.`parent`=`p`.`id`) as `parentitem`,
+ `contact`
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
+ AND `contact`.`id` = `item`.`contact-id`
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
+ AND `item`.`parent` = `parentitem`.`id`
$sql_extra
- ORDER BY `parent` DESC, `gravity` ASC, `created` ASC LIMIT %d ,%d ",
+ ORDER BY `parentitem`.`created` DESC, `item`.`gravity` ASC, `item`.`created` ASC LIMIT %d ,%d ",
intval($_SESSION['uid']),
intval($a->pager['start']),
intval($a->pager['itemspage'])