diff options
Diffstat (limited to 'src/Wallabag/ApiBundle')
-rw-r--r-- | src/Wallabag/ApiBundle/Controller/EntryRestController.php | 3 | ||||
-rw-r--r-- | src/Wallabag/ApiBundle/Form/Type/ClientType.php | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php index dbff6065..632b16d9 100644 --- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php +++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php | |||
@@ -95,12 +95,13 @@ class EntryRestController extends WallabagRestController | |||
95 | $tags = $request->query->get('tags', ''); | 95 | $tags = $request->query->get('tags', ''); |
96 | $since = $request->query->get('since', 0); | 96 | $since = $request->query->get('since', 0); |
97 | 97 | ||
98 | /** @var \Pagerfanta\Pagerfanta $pager */ | ||
98 | $pager = $this->getDoctrine() | 99 | $pager = $this->getDoctrine() |
99 | ->getRepository('WallabagCoreBundle:Entry') | 100 | ->getRepository('WallabagCoreBundle:Entry') |
100 | ->findEntries($this->getUser()->getId(), $isArchived, $isStarred, $sort, $order, $since, $tags); | 101 | ->findEntries($this->getUser()->getId(), $isArchived, $isStarred, $sort, $order, $since, $tags); |
101 | 102 | ||
102 | $pager->setCurrentPage($page); | ||
103 | $pager->setMaxPerPage($perPage); | 103 | $pager->setMaxPerPage($perPage); |
104 | $pager->setCurrentPage($page); | ||
104 | 105 | ||
105 | $pagerfantaFactory = new PagerfantaFactory('page', 'perPage'); | 106 | $pagerfantaFactory = new PagerfantaFactory('page', 'perPage'); |
106 | $paginatedCollection = $pagerfantaFactory->createRepresentation( | 107 | $paginatedCollection = $pagerfantaFactory->createRepresentation( |
diff --git a/src/Wallabag/ApiBundle/Form/Type/ClientType.php b/src/Wallabag/ApiBundle/Form/Type/ClientType.php index 0ea1a9c5..eaea4feb 100644 --- a/src/Wallabag/ApiBundle/Form/Type/ClientType.php +++ b/src/Wallabag/ApiBundle/Form/Type/ClientType.php | |||
@@ -16,7 +16,11 @@ class ClientType extends AbstractType | |||
16 | { | 16 | { |
17 | $builder | 17 | $builder |
18 | ->add('name', TextType::class, ['label' => 'developer.client.form.name_label']) | 18 | ->add('name', TextType::class, ['label' => 'developer.client.form.name_label']) |
19 | ->add('redirect_uris', UrlType::class, ['required' => false, 'label' => 'developer.client.form.redirect_uris_label']) | 19 | ->add('redirect_uris', UrlType::class, [ |
20 | 'required' => false, | ||
21 | 'label' => 'developer.client.form.redirect_uris_label', | ||
22 | 'property_path' => 'redirectUris', | ||
23 | ]) | ||
20 | ->add('save', SubmitType::class, ['label' => 'developer.client.form.save_label']) | 24 | ->add('save', SubmitType::class, ['label' => 'developer.client.form.save_label']) |
21 | ; | 25 | ; |
22 | 26 | ||