diff options
Diffstat (limited to 'src/Wallabag/ImportBundle/Controller')
12 files changed, 53 insertions, 14 deletions
diff --git a/src/Wallabag/ImportBundle/Controller/BrowserController.php b/src/Wallabag/ImportBundle/Controller/BrowserController.php index 6418925c..8c2bdfe5 100644 --- a/src/Wallabag/ImportBundle/Controller/BrowserController.php +++ b/src/Wallabag/ImportBundle/Controller/BrowserController.php | |||
@@ -2,10 +2,10 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ImportBundle\Controller; | 3 | namespace Wallabag\ImportBundle\Controller; |
4 | 4 | ||
5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 5 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
7 | use Symfony\Component\HttpFoundation\Request; | 6 | use Symfony\Component\HttpFoundation\Request; |
8 | use Symfony\Component\HttpFoundation\Response; | 7 | use Symfony\Component\HttpFoundation\Response; |
8 | use Symfony\Component\Routing\Annotation\Route; | ||
9 | use Wallabag\ImportBundle\Form\Type\UploadImportType; | 9 | use Wallabag\ImportBundle\Form\Type\UploadImportType; |
10 | 10 | ||
11 | abstract class BrowserController extends Controller | 11 | abstract class BrowserController extends Controller |
@@ -13,8 +13,6 @@ abstract class BrowserController extends Controller | |||
13 | /** | 13 | /** |
14 | * @Route("/browser", name="import_browser") | 14 | * @Route("/browser", name="import_browser") |
15 | * | 15 | * |
16 | * @param Request $request | ||
17 | * | ||
18 | * @return Response | 16 | * @return Response |
19 | */ | 17 | */ |
20 | public function indexAction(Request $request) | 18 | public function indexAction(Request $request) |
diff --git a/src/Wallabag/ImportBundle/Controller/ChromeController.php b/src/Wallabag/ImportBundle/Controller/ChromeController.php index 0cb418a1..6628cdb0 100644 --- a/src/Wallabag/ImportBundle/Controller/ChromeController.php +++ b/src/Wallabag/ImportBundle/Controller/ChromeController.php | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ImportBundle\Controller; | 3 | namespace Wallabag\ImportBundle\Controller; |
4 | 4 | ||
5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
6 | use Symfony\Component\HttpFoundation\Request; | 5 | use Symfony\Component\HttpFoundation\Request; |
6 | use Symfony\Component\Routing\Annotation\Route; | ||
7 | 7 | ||
8 | class ChromeController extends BrowserController | 8 | class ChromeController extends BrowserController |
9 | { | 9 | { |
diff --git a/src/Wallabag/ImportBundle/Controller/ElcuratorController.php b/src/Wallabag/ImportBundle/Controller/ElcuratorController.php new file mode 100644 index 00000000..174c2c96 --- /dev/null +++ b/src/Wallabag/ImportBundle/Controller/ElcuratorController.php | |||
@@ -0,0 +1,41 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\ImportBundle\Controller; | ||
4 | |||
5 | use Symfony\Component\HttpFoundation\Request; | ||
6 | use Symfony\Component\Routing\Annotation\Route; | ||
7 | |||
8 | class ElcuratorController extends WallabagController | ||
9 | { | ||
10 | /** | ||
11 | * @Route("/elcurator", name="import_elcurator") | ||
12 | */ | ||
13 | public function indexAction(Request $request) | ||
14 | { | ||
15 | return parent::indexAction($request); | ||
16 | } | ||
17 | |||
18 | /** | ||
19 | * {@inheritdoc} | ||
20 | */ | ||
21 | protected function getImportService() | ||
22 | { | ||
23 | $service = $this->get('wallabag_import.elcurator.import'); | ||
24 | |||
25 | if ($this->get('craue_config')->get('import_with_rabbitmq')) { | ||
26 | $service->setProducer($this->get('old_sound_rabbit_mq.import_elcurator_producer')); | ||
27 | } elseif ($this->get('craue_config')->get('import_with_redis')) { | ||
28 | $service->setProducer($this->get('wallabag_import.producer.redis.elcurator')); | ||
29 | } | ||
30 | |||
31 | return $service; | ||
32 | } | ||
33 | |||
34 | /** | ||
35 | * {@inheritdoc} | ||
36 | */ | ||
37 | protected function getImportTemplate() | ||
38 | { | ||
39 | return 'WallabagImportBundle:Elcurator:index.html.twig'; | ||
40 | } | ||
41 | } | ||
diff --git a/src/Wallabag/ImportBundle/Controller/FirefoxController.php b/src/Wallabag/ImportBundle/Controller/FirefoxController.php index 88697f9d..dce8455f 100644 --- a/src/Wallabag/ImportBundle/Controller/FirefoxController.php +++ b/src/Wallabag/ImportBundle/Controller/FirefoxController.php | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ImportBundle\Controller; | 3 | namespace Wallabag\ImportBundle\Controller; |
4 | 4 | ||
5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
6 | use Symfony\Component\HttpFoundation\Request; | 5 | use Symfony\Component\HttpFoundation\Request; |
6 | use Symfony\Component\Routing\Annotation\Route; | ||
7 | 7 | ||
8 | class FirefoxController extends BrowserController | 8 | class FirefoxController extends BrowserController |
9 | { | 9 | { |
diff --git a/src/Wallabag/ImportBundle/Controller/ImportController.php b/src/Wallabag/ImportBundle/Controller/ImportController.php index 7e4fd174..5a7e53d6 100644 --- a/src/Wallabag/ImportBundle/Controller/ImportController.php +++ b/src/Wallabag/ImportBundle/Controller/ImportController.php | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ImportBundle\Controller; | 3 | namespace Wallabag\ImportBundle\Controller; |
4 | 4 | ||
5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 5 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
6 | use Symfony\Component\Routing\Annotation\Route; | ||
7 | 7 | ||
8 | class ImportController extends Controller | 8 | class ImportController extends Controller |
9 | { | 9 | { |
@@ -43,6 +43,7 @@ class ImportController extends Controller | |||
43 | + $this->getTotalMessageInRabbitQueue('chrome') | 43 | + $this->getTotalMessageInRabbitQueue('chrome') |
44 | + $this->getTotalMessageInRabbitQueue('instapaper') | 44 | + $this->getTotalMessageInRabbitQueue('instapaper') |
45 | + $this->getTotalMessageInRabbitQueue('pinboard') | 45 | + $this->getTotalMessageInRabbitQueue('pinboard') |
46 | + $this->getTotalMessageInRabbitQueue('elcurator') | ||
46 | ; | 47 | ; |
47 | } catch (\Exception $e) { | 48 | } catch (\Exception $e) { |
48 | $rabbitNotInstalled = true; | 49 | $rabbitNotInstalled = true; |
@@ -59,6 +60,7 @@ class ImportController extends Controller | |||
59 | + $redis->llen('wallabag.import.chrome') | 60 | + $redis->llen('wallabag.import.chrome') |
60 | + $redis->llen('wallabag.import.instapaper') | 61 | + $redis->llen('wallabag.import.instapaper') |
61 | + $redis->llen('wallabag.import.pinboard') | 62 | + $redis->llen('wallabag.import.pinboard') |
63 | + $redis->llen('wallabag.import.elcurator') | ||
62 | ; | 64 | ; |
63 | } catch (\Exception $e) { | 65 | } catch (\Exception $e) { |
64 | $redisNotInstalled = true; | 66 | $redisNotInstalled = true; |
diff --git a/src/Wallabag/ImportBundle/Controller/InstapaperController.php b/src/Wallabag/ImportBundle/Controller/InstapaperController.php index f184baf9..faed3b72 100644 --- a/src/Wallabag/ImportBundle/Controller/InstapaperController.php +++ b/src/Wallabag/ImportBundle/Controller/InstapaperController.php | |||
@@ -2,9 +2,9 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ImportBundle\Controller; | 3 | namespace Wallabag\ImportBundle\Controller; |
4 | 4 | ||
5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 5 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
7 | use Symfony\Component\HttpFoundation\Request; | 6 | use Symfony\Component\HttpFoundation\Request; |
7 | use Symfony\Component\Routing\Annotation\Route; | ||
8 | use Wallabag\ImportBundle\Form\Type\UploadImportType; | 8 | use Wallabag\ImportBundle\Form\Type\UploadImportType; |
9 | 9 | ||
10 | class InstapaperController extends Controller | 10 | class InstapaperController extends Controller |
diff --git a/src/Wallabag/ImportBundle/Controller/PinboardController.php b/src/Wallabag/ImportBundle/Controller/PinboardController.php index 6f54c69a..cc6fae79 100644 --- a/src/Wallabag/ImportBundle/Controller/PinboardController.php +++ b/src/Wallabag/ImportBundle/Controller/PinboardController.php | |||
@@ -2,9 +2,9 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ImportBundle\Controller; | 3 | namespace Wallabag\ImportBundle\Controller; |
4 | 4 | ||
5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 5 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
7 | use Symfony\Component\HttpFoundation\Request; | 6 | use Symfony\Component\HttpFoundation\Request; |
7 | use Symfony\Component\Routing\Annotation\Route; | ||
8 | use Wallabag\ImportBundle\Form\Type\UploadImportType; | 8 | use Wallabag\ImportBundle\Form\Type\UploadImportType; |
9 | 9 | ||
10 | class PinboardController extends Controller | 10 | class PinboardController extends Controller |
diff --git a/src/Wallabag/ImportBundle/Controller/PocketController.php b/src/Wallabag/ImportBundle/Controller/PocketController.php index 9f28819a..71ceb427 100644 --- a/src/Wallabag/ImportBundle/Controller/PocketController.php +++ b/src/Wallabag/ImportBundle/Controller/PocketController.php | |||
@@ -2,10 +2,10 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ImportBundle\Controller; | 3 | namespace Wallabag\ImportBundle\Controller; |
4 | 4 | ||
5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 5 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
7 | use Symfony\Component\Form\Extension\Core\Type\CheckboxType; | 6 | use Symfony\Component\Form\Extension\Core\Type\CheckboxType; |
8 | use Symfony\Component\HttpFoundation\Request; | 7 | use Symfony\Component\HttpFoundation\Request; |
8 | use Symfony\Component\Routing\Annotation\Route; | ||
9 | use Symfony\Component\Routing\Generator\UrlGeneratorInterface; | 9 | use Symfony\Component\Routing\Generator\UrlGeneratorInterface; |
10 | 10 | ||
11 | class PocketController extends Controller | 11 | class PocketController extends Controller |
diff --git a/src/Wallabag/ImportBundle/Controller/ReadabilityController.php b/src/Wallabag/ImportBundle/Controller/ReadabilityController.php index 729a97a3..b120ef96 100644 --- a/src/Wallabag/ImportBundle/Controller/ReadabilityController.php +++ b/src/Wallabag/ImportBundle/Controller/ReadabilityController.php | |||
@@ -2,9 +2,9 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ImportBundle\Controller; | 3 | namespace Wallabag\ImportBundle\Controller; |
4 | 4 | ||
5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 5 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
7 | use Symfony\Component\HttpFoundation\Request; | 6 | use Symfony\Component\HttpFoundation\Request; |
7 | use Symfony\Component\Routing\Annotation\Route; | ||
8 | use Wallabag\ImportBundle\Form\Type\UploadImportType; | 8 | use Wallabag\ImportBundle\Form\Type\UploadImportType; |
9 | 9 | ||
10 | class ReadabilityController extends Controller | 10 | class ReadabilityController extends Controller |
diff --git a/src/Wallabag/ImportBundle/Controller/WallabagController.php b/src/Wallabag/ImportBundle/Controller/WallabagController.php index d182dd2c..5180006d 100644 --- a/src/Wallabag/ImportBundle/Controller/WallabagController.php +++ b/src/Wallabag/ImportBundle/Controller/WallabagController.php | |||
@@ -16,8 +16,6 @@ abstract class WallabagController extends Controller | |||
16 | /** | 16 | /** |
17 | * Handle import request. | 17 | * Handle import request. |
18 | * | 18 | * |
19 | * @param Request $request | ||
20 | * | ||
21 | * @return Response|RedirectResponse | 19 | * @return Response|RedirectResponse |
22 | */ | 20 | */ |
23 | public function indexAction(Request $request) | 21 | public function indexAction(Request $request) |
diff --git a/src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php b/src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php index d700d8a8..e1c35343 100644 --- a/src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php +++ b/src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ImportBundle\Controller; | 3 | namespace Wallabag\ImportBundle\Controller; |
4 | 4 | ||
5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
6 | use Symfony\Component\HttpFoundation\Request; | 5 | use Symfony\Component\HttpFoundation\Request; |
6 | use Symfony\Component\Routing\Annotation\Route; | ||
7 | 7 | ||
8 | class WallabagV1Controller extends WallabagController | 8 | class WallabagV1Controller extends WallabagController |
9 | { | 9 | { |
diff --git a/src/Wallabag/ImportBundle/Controller/WallabagV2Controller.php b/src/Wallabag/ImportBundle/Controller/WallabagV2Controller.php index ab26400c..c4116c1d 100644 --- a/src/Wallabag/ImportBundle/Controller/WallabagV2Controller.php +++ b/src/Wallabag/ImportBundle/Controller/WallabagV2Controller.php | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ImportBundle\Controller; | 3 | namespace Wallabag\ImportBundle\Controller; |
4 | 4 | ||
5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
6 | use Symfony\Component\HttpFoundation\Request; | 5 | use Symfony\Component\HttpFoundation\Request; |
6 | use Symfony\Component\Routing\Annotation\Route; | ||
7 | 7 | ||
8 | class WallabagV2Controller extends WallabagController | 8 | class WallabagV2Controller extends WallabagController |
9 | { | 9 | { |