Commit Graph

251 Commits

Author SHA1 Message Date
6aca334d53 Move to controller as a service
Mostly using autowiring to inject deps.
The only tricky part was for import because all producer use the same class and have a different alias. So we must write them down in the service definition, autowiring doesn't work in that case.

Usually:
- if a controller has a constructor, it means injected services are at least re-used once in actions
- otherwise, service are injected per action
2022-12-19 10:38:08 +01:00
33267f0736 Update to FOSUserBundle 3.1
Also remove some deprecation from Symfony.
Use `LegacyEventDispatcherProxy` to handle Symfony 4 dispatch from FOSUser
2022-12-14 09:42:17 +01:00
de5b138a59 Fix CS 2022-12-13 10:26:51 +01:00
b7dba18cb2 Cleanup 2022-11-23 15:51:33 +01:00
1d3935fbd3 Remove LiipThemeBundle
As baggy theme was removed and material is the only remaining theme, we don't need a theme switched anymore.
So:
- move all `*.twig` files from the material theme folder to the root
- remove useless translations
2022-11-23 14:52:06 +01:00
b41696fd1c Remove some deprecation 2022-11-22 21:39:34 +01:00
8d3fcd4635 Merge remote-tracking branch 'origin/master' into 2.6.0 2022-11-03 10:30:17 +01:00
29308024ac Removed old, not so maintained and buggy baggy theme 2022-11-03 09:55:20 +01:00
dc28d7ea0f Add support to download SVG locally 2022-10-18 11:14:45 +02:00
c372d68cc1 Merge remote-tracking branch 'origin/master' into 2.6.0 2022-10-18 11:11:02 +02:00
6da76ffaae Typofixes 2022-10-03 18:31:43 -06:00
98af2e25f2 Use ::class notation where possible 2022-09-01 20:54:56 +02:00
d1d56fbe25 Import used classes 2022-09-01 19:21:45 +02:00
974062f749 Merge pull request #5647 from wallabag/fix/epub-language 2022-03-21 22:40:01 +01:00
8f2fefe233 Merge pull request #5680 from wallabag/impr/intl
Replace `iconv()` calls with Transliterator
2022-03-21 22:28:49 +01:00
1608bf5a4e Replace iconv() calls with Transliterator
See https://stackoverflow.com/a/35178027/954513

Closes #5377

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2022-03-21 22:12:11 +01:00
0049ef390b Add some basic test 2022-03-21 21:29:30 +01:00
1b9e1d4886 add webp support 2022-03-21 21:29:26 +01:00
2c870423c4 Fix epub language
Ensure language has `_` instead of `-`
And update wallabag/phpepub
2022-03-21 20:56:29 +01:00
5c4993832e Fix tagging rule match when user a custom reading speed
By default, we assume the reading speed is 200 word per minute (WPM) when we save an entry.
User can change that value in the config and the rendering is properly performed with the user reading speed.
BUT, when the matching rule is applied, it uses the default reading time defined in the entry without applying the custom reading speed of the user.
This should fix that bug.

Also update the `wallabag:tag:all` to fix the bug when tagging all entries.
2022-03-02 19:12:33 +01:00
2b3ff84829 Avoid overlapping images when downloading them 2022-02-07 15:19:49 +01:00
ff1c4f6090 Fixed reading time in epub/pdf exports 2021-10-23 13:29:27 +02:00
7acd207054 Convert tag label to lowercase in RuleBasedTagger
Fixes #4266

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2021-03-06 19:46:24 +01:00
381f9681b5 Fix CS 2021-01-18 10:38:56 +01:00
c7a8800794 Fix phpDoc 2020-12-15 10:06:35 +01:00
9743058f7d Add a command to clean downloaded images
There were a bug in versions prior to 2.4.0 where images weren't properly removed (mostly when coming from the API).
With that command, we'll be able to remove images which aren't associated to any entries.

Like other command you can pass a username to only clean one user.
2020-12-14 22:19:19 +01:00
b22eb27623 ContentProxy: replace ignoreUrl with new RuleBasedIgnoreOriginProcessor
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2020-04-25 15:59:23 +02:00
f39c5a2a70 Add new Helper to process Ignore Origin rules and RulerZ operator
This commits adds a new helper like RuleBasedTagger for processing
ignore origin rules. It also adds a new custom RulerZ operator for the
'~' pattern matching rule.

Renames 'pattern' with '_all' in IgnoreOriginRule entity.

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2020-04-25 15:59:23 +02:00
0bddd34847 Added publication date on epub export 2020-04-06 16:14:36 +02:00
b12e23ad8a Cleanup cookie jar
As of latest Guzzle release, it's fixed so we can removed that code.
2020-03-29 11:39:49 +02:00
8d4ed0df06 Update deps
Also CS (because cs-fixer got an update)

Package operations: 0 installs, 26 updates, 0 removals
  - Updating twig/twig (v2.12.1 => v2.12.2)
  - Updating symfony/symfony (v3.4.33 => v3.4.34)
  - Updating doctrine/event-manager (v1.0.0 => 1.1.0)
  - Updating doctrine/collections (v1.6.2 => 1.6.3)
  - Updating doctrine/cache (v1.8.1 => 1.9.0)
  - Updating doctrine/persistence (1.1.1 => 1.2.0)
  - Updating doctrine/inflector (v1.3.0 => 1.3.1)
  - Updating symfony/mime (v4.3.5 => v4.3.7)
  - Updating swiftmailer/swiftmailer (v6.2.1 => v6.2.3)
  - Updating symfony/swiftmailer-bundle (v3.3.0 => v3.3.1)
  - Updating doctrine/dbal (v2.9.2 => v2.9.3)
  - Updating doctrine/instantiator (1.2.0 => 1.3.0)
  - Updating j0k3r/graby-site-config (1.0.93 => 1.0.94)
  - Updating phpoption/phpoption (1.5.0 => 1.5.2)
  - Updating symfony/http-client-contracts (v1.1.7 => v1.1.8)
  - Updating symfony/http-client (v4.3.5 => v4.3.7)
  - Updating sensiolabs/security-checker (v6.0.2 => v6.0.3)
  - Updating paragonie/constant_time_encoding (v2.2.3 => v2.3.0)
  - Updating scheb/two-factor-bundle (v4.7.1 => v4.8.0)
  - Updating symfony/phpunit-bridge (v4.3.6 => v4.3.7)
  - Updating composer/xdebug-handler (1.3.3 => 1.4.0)
  - Updating friendsofphp/php-cs-fixer (v2.15.3 => v2.16.0)
  - Updating doctrine/data-fixtures (v1.3.2 => 1.3.3)
  - Updating nette/schema (v1.0.0 => v1.0.1)
  - Updating nikic/php-parser (v4.2.4 => v4.3.0)
  - Updating sentry/sentry (2.2.2 => 2.2.4)
2019-11-12 14:18:58 +01:00
51d7f62b31 Add logger to FileCookieJar 2019-07-24 16:07:38 +02:00
9a80dcf11e Use a custom cookiejar to avoid error when the cookie is badly saved
It happens sometimes on wallabag.it, the json inside the cookie is badly saved and the json isn't valid. It generates an exception and avoid people to use the api and import contents.
To fix that, we use a dedicated `FileCookieJar`, which extends the default one from Guzzle to fix these issues.

Also updated deps
2019-07-24 10:42:20 +02:00
16e1c07553 Merge pull request #3271 from wallabag/store-resolved-url
Add `given_url` in Entry table to check if a redirected url has already added
2019-06-05 11:38:00 +02:00
7abda3ba52 Drop SimplePie
It was only used to make an absolute url when downloading images.
The deps is still there (in the `composer.lock`) because Graby use it (not for absolute but for encoding).
2019-05-29 17:05:12 +02:00
f3bfb875e9 Use hash given url to avoid duplicate
Using hashed url we can ensure an index on them to ensure it's fast.
2019-05-29 15:56:20 +02:00
b7fa51ae7d Added given_url in entry table
- Added index on entry table for given_url field
- Fix tests:

    The previous `bit.ly` url redirected to doc.wallabag but that url doesn't exist in the fixtures.
    I used our own internal "redirector" to create a redirect to an url which exist in the fixtures.

Also, updating current migration to use the new `WallabagMigration`.
2019-05-29 13:50:59 +02:00
2cbee36a01 Merge pull request #3944 from shtrom/always-hash-exists-url
Always hash exists url
2019-05-28 14:18:33 +02:00
6e68417f03 Fix tests after rebase 2019-05-28 12:02:17 +02:00
b6c1e1bacc Fix some tests 2019-05-28 11:44:20 +02:00
448d99f84e CS 2019-05-28 11:42:27 +02:00
1048c9c4a8 Configure timeout 2019-05-28 11:42:27 +02:00
5f08426201 Fix because of some breaking changes of Graby 2.0 2019-05-28 11:42:27 +02:00
bf9ace0643 Use httplug 2019-05-28 11:40:41 +02:00
0132ccd2a2 Change the way to define algorithm for hashing url 2019-05-24 15:17:46 +02:00
4a5516376b Add Wallabag\CoreBundle\Helper\UrlHasher
Signed-off-by: Olivier Mehani <shtrom@ssji.net>
2019-05-24 15:17:46 +02:00
423efadefc Set first picture as preview picture 2019-05-21 20:38:22 +02:00
9f0957b831 Merge remote-tracking branch 'origin/master' into 2.4 2019-05-15 14:38:07 +02:00
2dbb5b2307 Enable no-referrer on img tags, enable strict-origin-when-cross-origin by default
Fixes #3889

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2019-05-10 23:07:26 +02:00
844fd9fafc Fallback to default solution if Imagick fails 2019-05-10 16:52:01 +02:00