aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profile.php
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2012-01-03 21:14:48 +0100
committerFabio Comuni <fabrix.xm@gmail.com>2012-01-03 21:14:48 +0100
commit93563370c96848948d28ed39e13284ebaf7f430a (patch)
tree701c29133372625f54a098026d8570f191727a24 /mod/profile.php
parentbe2fd56aae51ee02b6e40dedd4383e1ebddc752e (diff)
parent184230e06826117b1d87241e3acdf19935470e8f (diff)
downloadvolse-hubzilla-93563370c96848948d28ed39e13284ebaf7f430a.tar.gz
volse-hubzilla-93563370c96848948d28ed39e13284ebaf7f430a.tar.bz2
volse-hubzilla-93563370c96848948d28ed39e13284ebaf7f430a.zip
Merge remote-tracking branch 'friendica/master'
Diffstat (limited to 'mod/profile.php')
-rw-r--r--mod/profile.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/mod/profile.php b/mod/profile.php
index 946499895..90a609d03 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -167,7 +167,7 @@ function profile_content(&$a, $update = 0) {
$r = q("SELECT distinct(parent) AS `item_id`, `contact`.`uid` AS `contact-uid`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
- and `item`.`parent` in (select parent from item where unseen = 1 )
+ and `item`.`unseen` = 1
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
AND `item`.`wall` = 1
$sql_extra
@@ -218,18 +218,19 @@ 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`, (SELECT `p`.`id`,`p`.`created` FROM `item` AS `p` WHERE `p`.`parent` = `p`.`id`) AS `parentitem`, `contact`
+ FROM `item`, `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` AND `item`.`parent` IN ( %s )
- $sql_extra
- ORDER BY `parentitem`.`created` DESC, `gravity` ASC, `item`.`created` ASC ",
+ AND `item`.`parent` IN ( %s )
+ $sql_extra ",
intval($a->profile['profile_uid']),
dbesc($parents_str)
);
}
+ $items = conv_sort($items,'created');
+
if($is_owner && ! $update) {
$o .= get_birthdays();
$o .= get_events();