diff options
Diffstat (limited to 'src/Wallabag/ImportBundle/Controller')
-rw-r--r-- | src/Wallabag/ImportBundle/Controller/PocketController.php | 5 | ||||
-rw-r--r-- | src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/Wallabag/ImportBundle/Controller/PocketController.php b/src/Wallabag/ImportBundle/Controller/PocketController.php index a0853383..72dc2696 100644 --- a/src/Wallabag/ImportBundle/Controller/PocketController.php +++ b/src/Wallabag/ImportBundle/Controller/PocketController.php | |||
@@ -3,6 +3,7 @@ | |||
3 | namespace Wallabag\ImportBundle\Controller; | 3 | namespace Wallabag\ImportBundle\Controller; |
4 | 4 | ||
5 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 5 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
6 | use Symfony\Component\Routing\Generator\UrlGeneratorInterface; | ||
6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | 7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
7 | 8 | ||
8 | class PocketController extends Controller | 9 | class PocketController extends Controller |
@@ -23,12 +24,12 @@ class PocketController extends Controller | |||
23 | public function authAction() | 24 | public function authAction() |
24 | { | 25 | { |
25 | $requestToken = $this->get('wallabag_import.pocket.import') | 26 | $requestToken = $this->get('wallabag_import.pocket.import') |
26 | ->getRequestToken($this->generateUrl('import', [], true)); | 27 | ->getRequestToken($this->generateUrl('import', UrlGeneratorInterface::ABSOLUTE_URL)); |
27 | 28 | ||
28 | $this->get('session')->set('import.pocket.code', $requestToken); | 29 | $this->get('session')->set('import.pocket.code', $requestToken); |
29 | 30 | ||
30 | return $this->redirect( | 31 | return $this->redirect( |
31 | 'https://getpocket.com/auth/authorize?request_token='.$requestToken.'&redirect_uri='.$this->generateUrl('import_pocket_callback', [], true), | 32 | 'https://getpocket.com/auth/authorize?request_token='.$requestToken.'&redirect_uri='.$this->generateUrl('import_pocket_callback', UrlGeneratorInterface::ABSOLUTE_URL), |
32 | 301 | 33 | 301 |
33 | ); | 34 | ); |
34 | } | 35 | } |
diff --git a/src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php b/src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php index e50a6c35..35fe620f 100644 --- a/src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php +++ b/src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php | |||
@@ -14,7 +14,7 @@ class WallabagV1Controller extends Controller | |||
14 | */ | 14 | */ |
15 | public function indexAction(Request $request) | 15 | public function indexAction(Request $request) |
16 | { | 16 | { |
17 | $form = $this->createForm(new UploadImportType()); | 17 | $form = $this->createForm(UploadImportType::class); |
18 | $form->handleRequest($request); | 18 | $form->handleRequest($request); |
19 | 19 | ||
20 | $wallabag = $this->get('wallabag_import.wallabag_v1.import'); | 20 | $wallabag = $this->get('wallabag_import.wallabag_v1.import'); |