diff options
author | Tobias Diekershoff <tobias.diekershoff@gmx.net> | 2011-05-31 07:36:25 +0200 |
---|---|---|
committer | Tobias Diekershoff <tobias.diekershoff@gmx.net> | 2011-05-31 07:36:25 +0200 |
commit | 745d075397941e0a84d017342bb9c4c4a4c1ef5b (patch) | |
tree | 98c1e5e93952b281dbedb63c1fb2e18344153202 /mod/profile.php | |
parent | 087f79236e79975d482f739e84cc16f6648e1bec (diff) | |
parent | f95ea14478e256d7eb331385746f83532d78d84a (diff) | |
download | volse-hubzilla-745d075397941e0a84d017342bb9c4c4a4c1ef5b.tar.gz volse-hubzilla-745d075397941e0a84d017342bb9c4c4a4c1ef5b.tar.bz2 volse-hubzilla-745d075397941e0a84d017342bb9c4c4a4c1ef5b.zip |
Merge branch 'master' of git://github.com/friendika/friendika
Diffstat (limited to 'mod/profile.php')
-rw-r--r-- | mod/profile.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mod/profile.php b/mod/profile.php index b80feab34..52551c45f 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -241,12 +241,13 @@ function profile_content(&$a, $update = 0) { `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`network`, `contact`.`rel`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`, `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` IN ( %s ) + AND `item`.`parent` = `parentitem`.`id` AND `item`.`parent` IN ( %s ) $sql_extra - ORDER BY `parent` DESC, `gravity` ASC, `item`.`id` ASC ", + ORDER BY `parentitem`.`created` DESC, `gravity` ASC, `item`.`created` ASC ", intval($a->profile['profile_uid']), dbesc($parents_str) ); |