diff options
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | composer.json | 2 | ||||
-rw-r--r-- | composer.lock | 136 | ||||
-rw-r--r-- | src/Wallabag/ImportBundle/Controller/PocketController.php | 12 |
4 files changed, 72 insertions, 80 deletions
diff --git a/.travis.yml b/.travis.yml index c09bcd22..8adef62e 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -39,8 +39,6 @@ matrix: | |||
39 | include: | 39 | include: |
40 | - php: 7.3 | 40 | - php: 7.3 |
41 | env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite | 41 | env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite |
42 | allow_failures: | ||
43 | - php: 7.4 | ||
44 | 42 | ||
45 | # exclude v1 branches | 43 | # exclude v1 branches |
46 | branches: | 44 | branches: |
diff --git a/composer.json b/composer.json index 0b228222..a4b2de6b 100644 --- a/composer.json +++ b/composer.json | |||
@@ -63,7 +63,7 @@ | |||
63 | "jms/serializer-bundle": "~2.2", | 63 | "jms/serializer-bundle": "~2.2", |
64 | "nelmio/api-doc-bundle": "^2.13.2", | 64 | "nelmio/api-doc-bundle": "^2.13.2", |
65 | "mgargano/simplehtmldom": "~1.5", | 65 | "mgargano/simplehtmldom": "~1.5", |
66 | "wallabag/tcpdf": "^6.2.26", | 66 | "tecnickcom/tcpdf": "^6.3.0", |
67 | "willdurand/hateoas-bundle": "~1.3", | 67 | "willdurand/hateoas-bundle": "~1.3", |
68 | "liip/theme-bundle": "^1.4.6", | 68 | "liip/theme-bundle": "^1.4.6", |
69 | "lexik/form-filter-bundle": "^5.0.4", | 69 | "lexik/form-filter-bundle": "^5.0.4", |
diff --git a/composer.lock b/composer.lock index 78567da6..551807c5 100644 --- a/composer.lock +++ b/composer.lock | |||
@@ -4,7 +4,7 @@ | |||
4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", | 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", |
5 | "This file is @generated automatically" | 5 | "This file is @generated automatically" |
6 | ], | 6 | ], |
7 | "content-hash": "60ce056a3ba44dfa4e039261a2326ae9", | 7 | "content-hash": "934e7fcdcc82a110216efe0a9364ba2c", |
8 | "packages": [ | 8 | "packages": [ |
9 | { | 9 | { |
10 | "name": "bdunogier/guzzle-site-authenticator", | 10 | "name": "bdunogier/guzzle-site-authenticator", |
@@ -9165,6 +9165,68 @@ | |||
9165 | "time": "2020-03-30T06:25:29+00:00" | 9165 | "time": "2020-03-30T06:25:29+00:00" |
9166 | }, | 9166 | }, |
9167 | { | 9167 | { |
9168 | "name": "tecnickcom/tcpdf", | ||
9169 | "version": "6.3.5", | ||
9170 | "source": { | ||
9171 | "type": "git", | ||
9172 | "url": "https://github.com/tecnickcom/TCPDF.git", | ||
9173 | "reference": "19a535eaa7fb1c1cac499109deeb1a7a201b4549" | ||
9174 | }, | ||
9175 | "dist": { | ||
9176 | "type": "zip", | ||
9177 | "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/19a535eaa7fb1c1cac499109deeb1a7a201b4549", | ||
9178 | "reference": "19a535eaa7fb1c1cac499109deeb1a7a201b4549", | ||
9179 | "shasum": "" | ||
9180 | }, | ||
9181 | "require": { | ||
9182 | "php": ">=5.3.0" | ||
9183 | }, | ||
9184 | "type": "library", | ||
9185 | "autoload": { | ||
9186 | "classmap": [ | ||
9187 | "config", | ||
9188 | "include", | ||
9189 | "tcpdf.php", | ||
9190 | "tcpdf_parser.php", | ||
9191 | "tcpdf_import.php", | ||
9192 | "tcpdf_barcodes_1d.php", | ||
9193 | "tcpdf_barcodes_2d.php", | ||
9194 | "include/tcpdf_colors.php", | ||
9195 | "include/tcpdf_filters.php", | ||
9196 | "include/tcpdf_font_data.php", | ||
9197 | "include/tcpdf_fonts.php", | ||
9198 | "include/tcpdf_images.php", | ||
9199 | "include/tcpdf_static.php", | ||
9200 | "include/barcodes/datamatrix.php", | ||
9201 | "include/barcodes/pdf417.php", | ||
9202 | "include/barcodes/qrcode.php" | ||
9203 | ] | ||
9204 | }, | ||
9205 | "notification-url": "https://packagist.org/downloads/", | ||
9206 | "license": [ | ||
9207 | "LGPL-3.0-only" | ||
9208 | ], | ||
9209 | "authors": [ | ||
9210 | { | ||
9211 | "name": "Nicola Asuni", | ||
9212 | "email": "info@tecnick.com", | ||
9213 | "role": "lead" | ||
9214 | } | ||
9215 | ], | ||
9216 | "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", | ||
9217 | "homepage": "http://www.tcpdf.org/", | ||
9218 | "keywords": [ | ||
9219 | "PDFD32000-2008", | ||
9220 | "TCPDF", | ||
9221 | "barcodes", | ||
9222 | "datamatrix", | ||
9223 | "pdf", | ||
9224 | "pdf417", | ||
9225 | "qrcode" | ||
9226 | ], | ||
9227 | "time": "2020-02-14T14:20:12+00:00" | ||
9228 | }, | ||
9229 | { | ||
9168 | "name": "true/punycode", | 9230 | "name": "true/punycode", |
9169 | "version": "v2.1.1", | 9231 | "version": "v2.1.1", |
9170 | "source": { | 9232 | "source": { |
@@ -9441,78 +9503,6 @@ | |||
9441 | "time": "2020-03-22T16:24:31+00:00" | 9503 | "time": "2020-03-22T16:24:31+00:00" |
9442 | }, | 9504 | }, |
9443 | { | 9505 | { |
9444 | "name": "wallabag/tcpdf", | ||
9445 | "version": "6.2.26", | ||
9446 | "source": { | ||
9447 | "type": "git", | ||
9448 | "url": "https://github.com/wallabag/TCPDF.git", | ||
9449 | "reference": "bf590f0604bcef1ae6fa3145649cf997f3564477" | ||
9450 | }, | ||
9451 | "dist": { | ||
9452 | "type": "zip", | ||
9453 | "url": "https://api.github.com/repos/wallabag/TCPDF/zipball/bf590f0604bcef1ae6fa3145649cf997f3564477", | ||
9454 | "reference": "bf590f0604bcef1ae6fa3145649cf997f3564477", | ||
9455 | "shasum": "" | ||
9456 | }, | ||
9457 | "require": { | ||
9458 | "php": ">=5.3.0" | ||
9459 | }, | ||
9460 | "replace": { | ||
9461 | "tecnickcom/tcpdf": "6.2.*" | ||
9462 | }, | ||
9463 | "type": "library", | ||
9464 | "autoload": { | ||
9465 | "classmap": [ | ||
9466 | "fonts", | ||
9467 | "config", | ||
9468 | "include", | ||
9469 | "tcpdf.php", | ||
9470 | "tcpdf_parser.php", | ||
9471 | "tcpdf_import.php", | ||
9472 | "tcpdf_barcodes_1d.php", | ||
9473 | "tcpdf_barcodes_2d.php", | ||
9474 | "include/tcpdf_colors.php", | ||
9475 | "include/tcpdf_filters.php", | ||
9476 | "include/tcpdf_font_data.php", | ||
9477 | "include/tcpdf_fonts.php", | ||
9478 | "include/tcpdf_images.php", | ||
9479 | "include/tcpdf_static.php", | ||
9480 | "include/barcodes/datamatrix.php", | ||
9481 | "include/barcodes/pdf417.php", | ||
9482 | "include/barcodes/qrcode.php" | ||
9483 | ] | ||
9484 | }, | ||
9485 | "notification-url": "https://packagist.org/downloads/", | ||
9486 | "license": [ | ||
9487 | "LGPL-3.0" | ||
9488 | ], | ||
9489 | "authors": [ | ||
9490 | { | ||
9491 | "name": "Nicola Asuni", | ||
9492 | "email": "info@tecnick.com", | ||
9493 | "homepage": "http://nicolaasuni.tecnick.com", | ||
9494 | "role": "Main developer" | ||
9495 | }, | ||
9496 | { | ||
9497 | "name": "wallabag/core", | ||
9498 | "homepage": "https://www.wallabag.org", | ||
9499 | "role": "Developers" | ||
9500 | } | ||
9501 | ], | ||
9502 | "description": "Keeping a working 6.2.x TCPDF version.", | ||
9503 | "homepage": "https://www.wallabag.org/", | ||
9504 | "keywords": [ | ||
9505 | "PDFD32000-2008", | ||
9506 | "TCPDF", | ||
9507 | "barcodes", | ||
9508 | "datamatrix", | ||
9509 | "pdf", | ||
9510 | "pdf417", | ||
9511 | "qrcode" | ||
9512 | ], | ||
9513 | "time": "2018-10-25T06:56:14+00:00" | ||
9514 | }, | ||
9515 | { | ||
9516 | "name": "white-october/pagerfanta-bundle", | 9506 | "name": "white-october/pagerfanta-bundle", |
9517 | "version": "v1.3.2", | 9507 | "version": "v1.3.2", |
9518 | "source": { | 9508 | "source": { |
diff --git a/src/Wallabag/ImportBundle/Controller/PocketController.php b/src/Wallabag/ImportBundle/Controller/PocketController.php index 71ceb427..f952867b 100644 --- a/src/Wallabag/ImportBundle/Controller/PocketController.php +++ b/src/Wallabag/ImportBundle/Controller/PocketController.php | |||
@@ -47,8 +47,12 @@ class PocketController extends Controller | |||
47 | return $this->redirect($this->generateUrl('import_pocket')); | 47 | return $this->redirect($this->generateUrl('import_pocket')); |
48 | } | 48 | } |
49 | 49 | ||
50 | $form = $request->request->get('form'); | ||
51 | |||
50 | $this->get('session')->set('import.pocket.code', $requestToken); | 52 | $this->get('session')->set('import.pocket.code', $requestToken); |
51 | $this->get('session')->set('mark_as_read', $request->request->get('form')['mark_as_read']); | 53 | if (null !== $form && \array_key_exists('mark_as_read', $form)) { |
54 | $this->get('session')->set('mark_as_read', $form['mark_as_read']); | ||
55 | } | ||
52 | 56 | ||
53 | return $this->redirect( | 57 | return $this->redirect( |
54 | 'https://getpocket.com/auth/authorize?request_token=' . $requestToken . '&redirect_uri=' . $this->generateUrl('import_pocket_callback', [], UrlGeneratorInterface::ABSOLUTE_URL), | 58 | 'https://getpocket.com/auth/authorize?request_token=' . $requestToken . '&redirect_uri=' . $this->generateUrl('import_pocket_callback', [], UrlGeneratorInterface::ABSOLUTE_URL), |
@@ -80,11 +84,11 @@ class PocketController extends Controller | |||
80 | if (true === $pocket->setMarkAsRead($markAsRead)->import()) { | 84 | if (true === $pocket->setMarkAsRead($markAsRead)->import()) { |
81 | $summary = $pocket->getSummary(); | 85 | $summary = $pocket->getSummary(); |
82 | $message = $this->get('translator')->trans('flashes.import.notice.summary', [ | 86 | $message = $this->get('translator')->trans('flashes.import.notice.summary', [ |
83 | '%imported%' => $summary['imported'], | 87 | '%imported%' => null !== $summary && \array_key_exists('imported', $summary) ? $summary['imported'] : 0, |
84 | '%skipped%' => $summary['skipped'], | 88 | '%skipped%' => null !== $summary && \array_key_exists('skipped', $summary) ? $summary['skipped'] : 0, |
85 | ]); | 89 | ]); |
86 | 90 | ||
87 | if (0 < $summary['queued']) { | 91 | if (null !== $summary && \array_key_exists('queued', $summary) && 0 < $summary['queued']) { |
88 | $message = $this->get('translator')->trans('flashes.import.notice.summary_with_queue', [ | 92 | $message = $this->get('translator')->trans('flashes.import.notice.summary_with_queue', [ |
89 | '%queued%' => $summary['queued'], | 93 | '%queued%' => $summary['queued'], |
90 | ]); | 94 | ]); |