mirror of
https://github.com/friendica/friendica
synced 2025-04-26 05:10:11 +00:00
code lisibility & filter optimization
This commit is contained in:
parent
4496df79ab
commit
ec2c84a4e9
4 changed files with 21 additions and 22 deletions
|
@ -196,7 +196,7 @@ class ForumManager
|
|||
*/
|
||||
public static function countUnseenItems()
|
||||
{
|
||||
$r = DBA::p(
|
||||
$stmtContacts = DBA::p(
|
||||
"SELECT `contact`.`id`, `contact`.`name`, COUNT(*) AS `count` FROM `item`
|
||||
INNER JOIN `contact` ON `item`.`contact-id` = `contact`.`id`
|
||||
WHERE `item`.`uid` = %d AND `item`.`visible` AND NOT `item`.`deleted` AND `item`.`unseen`
|
||||
|
@ -208,6 +208,6 @@ class ForumManager
|
|||
intval(local_user())
|
||||
);
|
||||
|
||||
return DBA::toArray($r);
|
||||
return DBA::toArray($stmtContacts);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue