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.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Wallabag/ImportBundle/Controller/PocketController.php b/src/Wallabag/ImportBundle/Controller/PocketController.php
index c88e115e..7a35514b 100644
--- a/src/Wallabag/ImportBundle/Controller/PocketController.php
+++ b/src/Wallabag/ImportBundle/Controller/PocketController.php
@@ -17,8 +17,8 @@ class PocketController extends Controller
17 { 17 {
18 $pocket = $this->get('wallabag_import.pocket.import'); 18 $pocket = $this->get('wallabag_import.pocket.import');
19 $form = $this->createFormBuilder($pocket) 19 $form = $this->createFormBuilder($pocket)
20 ->add('read', CheckboxType::class, array( 20 ->add('mark_as_read', CheckboxType::class, array(
21 'label' => 'Mark all as read', 21 'label' => 'import.form.mark_as_read_label',
22 'required' => false, 22 'required' => false,
23 )) 23 ))
24 ->getForm(); 24 ->getForm();
@@ -39,7 +39,7 @@ class PocketController extends Controller
39 ->getRequestToken($this->generateUrl('import', array(), UrlGeneratorInterface::ABSOLUTE_URL)); 39 ->getRequestToken($this->generateUrl('import', array(), UrlGeneratorInterface::ABSOLUTE_URL));
40 40
41 $this->get('session')->set('import.pocket.code', $requestToken); 41 $this->get('session')->set('import.pocket.code', $requestToken);
42 $this->get('session')->set('read', $request->request->get('form')['read']); 42 $this->get('session')->set('mark_as_read', $request->request->get('form')['mark_as_read']);
43 43
44 return $this->redirect( 44 return $this->redirect(
45 'https://getpocket.com/auth/authorize?request_token='.$requestToken.'&redirect_uri='.$this->generateUrl('import_pocket_callback', array(), UrlGeneratorInterface::ABSOLUTE_URL), 45 'https://getpocket.com/auth/authorize?request_token='.$requestToken.'&redirect_uri='.$this->generateUrl('import_pocket_callback', array(), UrlGeneratorInterface::ABSOLUTE_URL),
@@ -54,8 +54,8 @@ class PocketController extends Controller
54 { 54 {
55 $message = 'Import failed, please try again.'; 55 $message = 'Import failed, please try again.';
56 $pocket = $this->get('wallabag_import.pocket.import'); 56 $pocket = $this->get('wallabag_import.pocket.import');
57 $markAsRead = $this->get('session')->get('read'); 57 $markAsRead = $this->get('session')->get('mark_as_read');
58 $this->get('session')->remove('read'); 58 $this->get('session')->remove('mark_as_read');
59 59
60 // something bad happend on pocket side 60 // something bad happend on pocket side
61 if (false === $pocket->authorize($this->get('session')->get('import.pocket.code'))) { 61 if (false === $pocket->authorize($this->get('session')->get('import.pocket.code'))) {