1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-16 18:01:38 +00:00

Merge branch '2.6'

# Conflicts:
#	src/Repository/EntryRepository.php
#	src/Twig/WallabagExtension.php
#	src/Wallabag/CoreBundle/Resources/views/Entry/_card_actions.html.twig
#	src/Wallabag/CoreBundle/Resources/views/Entry/_card_list.html.twig
#	tests/Twig/WallabagExtensionTest.php
This commit is contained in:
Yassine Guedidi 2025-03-18 20:59:39 +01:00
commit 2272d3da66
9 changed files with 68 additions and 32 deletions

View file

@ -148,6 +148,12 @@ class AnnotationRepository extends ServiceEntityRepository
->getResult();
}
public function getCountBuilderByUser($userId = null)
{
return $this->createQueryBuilder('e')
->andWhere('e.user = :userId')->setParameter('userId', $userId);
}
/**
* Return a query builder to used by other getBuilderFor* method.
*

View file

@ -228,21 +228,6 @@ class EntryRepository extends ServiceEntityRepository
;
}
/**
* Retrieve entries with annotations count for a user.
*
* @param int $userId
*
* @return QueryBuilder
*/
public function getCountBuilderForAnnotationsByUser($userId)
{
return $this
->getQueryBuilderByUser($userId)
->innerJoin('e.annotations', 'a')
;
}
/**
* Retrieve untagged entries for a user.
*