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>
The fix relies on a workaround available on TagsAssigner, see the
AssignTagsToEntry() signature for detail.
I replaced the findOneByLabel in the corresponding test to assert that
there is no duplicate.
Fixes#4216
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
- hiddenName has been disabled in order to fix the missing date range
values when using the material theme
- data format has been changed to 'Y-m-d' in order to comply with the
browser date input default format
- tests: date() and strtotime have been replaced with DateTime-related
objects
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
- Add missing translations
- Add some tests
- Add `/api/taggingrule/export` API endpoint
- Add baggy theme
- Add error message when importing tagging rules failed
- Also fix all translations (I think we are good now)
The previous URL started to report title as `snippet intertitre` instead of the previous title which contains Google.
It looks like a bug on the website side. Instead of updating the test to match that new title, I prefer to use a more recent url instead.
When using `OR` in a where clause, a composite index can't be used. We should use a `UNION` to take advantages of it.
Instead, create 2 indexes on each hashed urls and make 2 queries to find an url. It'll be faster than the previous solution.
- 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`.
utf8mb4_unicode_ci considers that 'caché' is equal to 'cache' which
can lead to attaching incorrect tags to entries. This issue is due to
some unicode normalization done by MySQL.
utf8mb4_bin makes no unicode normalization, letting wallabag to consider
'cache' and 'caché' as two different tags.
We change the collation of the whole table as Doctrine does not support
setting a collation on a column for a specific platform (it tries to
apply utf8mb4_bin even for pgsql and sqlite).
Fixes#3302
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
detail=metadata will nullify the content field of entries in order to
make smaller responses.
detail=full keeps the former behavior, it sends the content of entries.
It's the default, for backward compatibility.
Fixes#2817
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Instead of fetching one domain, we use the same method as in site config (to retrieve the matching file) and handle api.example.org, example.org, .org (yes the last one isn’t useful).
If one of these match, we got it and use it.
The expect parameter enables an application to request the whole entry
or only the id when requesting its deletion.
`expects` defaults to `entry` to prevent any API breakage.
Fixes#3711
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
When using the entity manager to retrieve an already stored entry, the
id disapears from $entry after the first delete call. This leads to
testing a nonexistent endpoint (api/entries/.json) during the second
delete call.
This change now creates an entry specifically for the test.
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
- Update SchebTwoFactorBundle to version 3
- Enable Google 2fa on the bundle
- Disallow ability to use both email and google as 2fa
- Update Ocramius Proxy Manager to handle typed function & attributes (from PHP 7)
- use `$this->addFlash` shortcut instead of `$this->get('session')->getFlashBag()->add`
- update admin to be able to create/reset the 2fa
- Adds a new `search` key to `src/Wallabag/ApiBundle/Resources/config/routing_rest.yml`
- Reuses the `getBuilderForSearchByUser` method from the EntryRepository
- Supports, `term`, `page`, and `perPage` query parameters
- Some very basic tests
Useful for api client which required some information.
We might add more inside them in the future.
The endpoint /api/version should be avoided now as it contains not so much information rather the version.
If someone send a malformated client_id when trying to authenticate using the API we got a 500 if wallabag use postgres because the request send a string instead of an integer.
As the deletion now requires that at least one entry for the user must
be linked to the given tag, we fix the test testDeleteUserTag by linking
it to an entry.
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
When creating the schema for test these tables use default length for
string: 255. Which fail when using utf8mb4.
> Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
Also move the `setKeepStaticConnections` in before and after class to
avoid:
> SAVEPOINT DOCTRINE2_SAVEPOINT_2 does not exist
See https://github.com/dmaicher/doctrine-test-bundle#troubleshooting