Merge pull request #2102 from annando/1511-unseen-forums
Bugfix: Now the unseen counter for forums work
This commit is contained in:
commit
5fe8ae514b
|
@ -162,9 +162,9 @@ function forumlist_profile_advanced($uid) {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function forums_count_unseen() {
|
function forums_count_unseen() {
|
||||||
$r = q("SELECT `contact`.`id`, `contact`.`name`, COUNT(`item`.`unseen`) AS `count` FROM `item`
|
$r = q("SELECT `contact`.`id`, `contact`.`name`, COUNT(*) AS `count` FROM `item`
|
||||||
INNER JOIN `contact` ON `item`.`contact-id` = `contact`.`id`
|
INNER JOIN `contact` ON `item`.`contact-id` = `contact`.`id`
|
||||||
WHERE `item`.`uid` = %d AND `item`.`visible` AND NOT `item`.`deleted`
|
WHERE `item`.`uid` = %d AND `item`.`visible` AND NOT `item`.`deleted` AND `item`.`unseen`
|
||||||
AND `contact`.`network`= 'dfrn' AND (`contact`.`forum` OR `contact`.`prv`)
|
AND `contact`.`network`= 'dfrn' AND (`contact`.`forum` OR `contact`.`prv`)
|
||||||
AND NOT `contact`.`blocked` AND NOT `contact`.`hidden`
|
AND NOT `contact`.`blocked` AND NOT `contact`.`hidden`
|
||||||
AND NOT `contact`.`pending` AND NOT `contact`.`archive`
|
AND NOT `contact`.`pending` AND NOT `contact`.`archive`
|
||||||
|
|
Loading…
Reference in a new issue