aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/ImportBundle/Controller')
-rw-r--r--src/Wallabag/ImportBundle/Controller/PocketController.php5
-rw-r--r--src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php2
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 @@
3namespace Wallabag\ImportBundle\Controller; 3namespace Wallabag\ImportBundle\Controller;
4 4
5use Symfony\Bundle\FrameworkBundle\Controller\Controller; 5use Symfony\Bundle\FrameworkBundle\Controller\Controller;
6use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
6use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; 7use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
7 8
8class PocketController extends Controller 9class 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');