diff options
author | Friendika <info@friendika.com> | 2011-05-30 19:59:54 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-05-30 19:59:54 -0700 |
commit | 9f52e311df830dbce8a428cea3190ac5c450eb94 (patch) | |
tree | 9c927cf3600a91ec4be9a14e3539d1aba15a8cb5 /mod | |
parent | 656d861b3ea83ff2acdc5e0c1c7bc3da86dc7c3a (diff) | |
download | volse-hubzilla-9f52e311df830dbce8a428cea3190ac5c450eb94.tar.gz volse-hubzilla-9f52e311df830dbce8a428cea3190ac5c450eb94.tar.bz2 volse-hubzilla-9f52e311df830dbce8a428cea3190ac5c450eb94.zip |
sort wall items by date order instead of id. bug #61
Diffstat (limited to 'mod')
-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) ); |