mirror of
https://github.com/wallabag/wallabag.git
synced 2025-01-31 15:55:06 +01:00
commit
fa884b30ba
@ -227,7 +227,7 @@ class EntryController extends Controller
|
|||||||
public function showUnreadAction(Request $request, $page)
|
public function showUnreadAction(Request $request, $page)
|
||||||
{
|
{
|
||||||
// load the quickstart if no entry in database
|
// load the quickstart if no entry in database
|
||||||
if ($page == 1 && $this->get('wallabag_core.entry_repository')->countAllEntriesByUsername($this->getUser()->getId()) == 0) {
|
if ($page == 1 && $this->get('wallabag_core.entry_repository')->countAllEntriesByUser($this->getUser()->getId()) == 0) {
|
||||||
return $this->redirect($this->generateUrl('quickstart'));
|
return $this->redirect($this->generateUrl('quickstart'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ class EntryRepository extends EntityRepository
|
|||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function countAllEntriesByUsername($userId)
|
public function countAllEntriesByUser($userId)
|
||||||
{
|
{
|
||||||
$qb = $this->createQueryBuilder('e')
|
$qb = $this->createQueryBuilder('e')
|
||||||
->select('count(e)')
|
->select('count(e)')
|
||||||
|
@ -798,7 +798,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
|||||||
|
|
||||||
$entryReset = $em
|
$entryReset = $em
|
||||||
->getRepository('WallabagCoreBundle:Entry')
|
->getRepository('WallabagCoreBundle:Entry')
|
||||||
->countAllEntriesByUsername($user->getId());
|
->countAllEntriesByUser($user->getId());
|
||||||
|
|
||||||
$this->assertEquals(0, $entryReset, 'Entries were reset');
|
$this->assertEquals(0, $entryReset, 'Entries were reset');
|
||||||
}
|
}
|
||||||
@ -843,7 +843,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
|||||||
|
|
||||||
$entryReset = $em
|
$entryReset = $em
|
||||||
->getRepository('WallabagCoreBundle:Entry')
|
->getRepository('WallabagCoreBundle:Entry')
|
||||||
->countAllEntriesByUsername($user->getId());
|
->countAllEntriesByUser($user->getId());
|
||||||
|
|
||||||
$this->assertEquals(0, $entryReset, 'Entries were reset');
|
$this->assertEquals(0, $entryReset, 'Entries were reset');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user