better fix for threads with no parent showing up as unseen

This commit is contained in:
friendica 2012-10-10 16:17:40 -07:00
parent 8a1f9d32ab
commit 816db4396a
2 changed files with 2 additions and 2 deletions

View file

@ -229,7 +229,7 @@ function notifications_content(&$a) {
`item`.`author-link`, `item`.`author-avatar`, `item`.`created`, `item`.`object` as `object`,
`pitem`.`author-name` as `pname`, `pitem`.`author-link` as `plink`
FROM `item` INNER JOIN `item` as `pitem` ON `pitem`.`id`=`item`.`parent`
WHERE `item`.`unseen` = 1 AND `item`.`visible` = 1 AND
WHERE `item`.`unseen` = 1 AND `item`.`visible` = 1 AND `pitem`.`parent` != 0
`item`.`deleted` = 0 AND `item`.`uid` = %d AND `item`.`wall` = 0 ORDER BY `item`.`created` DESC" ,
intval(local_user())
);

View file

@ -64,7 +64,7 @@ function ping_init(&$a) {
`pitem`.`author-name` as `pname`, `pitem`.`author-link` as `plink`
FROM `item` INNER JOIN `item` as `pitem` ON `pitem`.`id`=`item`.`parent`
WHERE `item`.`unseen` = 1 AND `item`.`visible` = 1 AND
`item`.`deleted` = 0 AND `item`.`uid` = %d AND `item`.`parent` != 0
`item`.`deleted` = 0 AND `item`.`uid` = %d AND `pitem`.`parent` != 0
ORDER BY `item`.`created` DESC",
intval(local_user())
);