Commit graph

173 commits

Author SHA1 Message Date
Jeremy Benoist b7dba18cb2
Cleanup 2022-11-23 15:51:33 +01:00
Jeremy Benoist c372d68cc1
Merge remote-tracking branch 'origin/master' into 2.6.0 2022-10-18 11:11:02 +02:00
Yotam Nachum f994ab8b5d Add domain_name to entries api endpoint 2022-10-16 18:36:41 +03:00
JT Smith 6da76ffaae Typofixes 2022-10-03 18:31:43 -06:00
Yassine Guedidi 1bee0eeb29 Make repositories use ServiceEntityRepository 2022-08-31 02:05:30 +02:00
Jeremy Benoist 4947ea6758
Merge remote-tracking branch 'origin/master' into 2.5.0 2022-05-13 13:50:50 +02:00
Adrien Gallou 29df8ed590
this change adds an option to sort the feed entires by updated_at
There is now an option to sort the feed entires by updated_at, on the
controler : a sort querystring argument that accepts either "created"
or "updated".
2022-03-14 22:58:45 +01:00
Nicolas Lœuillet 6dfc031839
Enhanced tests and changed route 2022-03-02 20:07:43 +01:00
Nicolas Lœuillet dce50ddb79
Added route to list entries with annotations 2022-03-02 20:07:17 +01:00
Jeremy Benoist 9a6146d2ef
Merge remote-tracking branch 'origin/master' into 2.5.0 2022-03-02 20:03:33 +01:00
Nicolas Lœuillet ca845b3204
Merge pull request #5379 from wallabag/fix-search-homepage
Fixed search on homepage
2021-08-20 11:16:33 +02:00
Kevin Decherf 19802d8bd5 Improve performance of REST exists call
I've noticed that the endpoint `/api/entries/exists` used by the "Sweep
articles" feature on the Android app failed almost all the time on my
instance.

After checking the corresponding method I found that
`EntryRestController::getEntriesExistsAction()` could be improved.

Here is the former way the method worked:

```
for id in [list of ids]
  get full entry by id
  if null
    get full entry by given id

return array of ids or array of hashes
```

With this behavior on my instance I could expect up to 13k SQL requests
when sweeping articles from the Android app. Morever the repository
fetches all fields (content included) while the method only returns ids
or hashes.

The new behavior is described as follow:

```
get ids, hashes by [list of ids]
merge with provided [list of ids] // this part will complete the final
                                  // array with not found ids

return array of ids or array of hashes
```

In my case this change reduces the number of SQL requests to only 135
(_considering one request for 50 articles_)

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2021-08-05 23:19:08 +02:00
Nicolas Lœuillet f664af752d Fixed search on homepage 2021-08-03 11:54:36 +02:00
Kevin Decherf 1ba4d40e82 Tag view: order tags by label
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2021-05-20 13:09:27 +02:00
Nicolas Lœuillet 890c7d0bfa
Added button to show entries with the same domain 2021-02-08 09:45:38 +01:00
Nicolas Lœuillet 5857031262 Fixed query to fetch URL to hash 2020-12-22 14:58:07 +01:00
Nicolas Lœuillet 68060f545a Added a query to parse only non-hashed URL
Fixed #4864
2020-12-20 09:23:59 +01:00
Jeremy Benoist c10b79e82f
Update PagerFanta deprecation 2020-07-29 06:36:43 +02:00
Jeremy Benoist 33d245b7da
Remove deprecated methods 2020-07-08 07:25:44 +02:00
Kevin Decherf c675bd11c6 Add IgnoreOriginRule-related entities, db migration, update config
Add IgnoreOriginUserRule for user-defined rules and
IgnoreOriginInstanceRule for system-wide rules. Add an interface for
these two new entities.

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2020-04-25 15:59:23 +02:00
Jeremy Benoist 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
Jeremy Benoist 0f2d24feb4
Fix typo & CS 2019-06-05 17:09:05 +02:00
Kevin Decherf ad51743e8b
Show untagged entries count on tag list
Closes #3235

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2019-06-05 17:03:51 +02:00
Jérémy Benoist 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
Jeremy Benoist 70df4c3359
Use two indexes instead of one for hashed urls
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.
2019-06-05 10:53:15 +02:00
Jeremy Benoist 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
Nicolas Lœuillet 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
Jeremy Benoist 52e8d93248
Fix some Scrutinizer issues 2019-05-29 12:50:44 +02:00
Jeremy Benoist 629a3797bc
Remove useless methods
Also fix a phpdoc block
2019-05-24 15:46:28 +02:00
Jeremy Benoist 0132ccd2a2
Change the way to define algorithm for hashing url 2019-05-24 15:17:46 +02:00
Olivier Mehani 4a5516376b
Add Wallabag\CoreBundle\Helper\UrlHasher
Signed-off-by: Olivier Mehani <shtrom@ssji.net>
2019-05-24 15:17:46 +02:00
Olivier Mehani d5744bf0df
Delegate findByUrlAndUserId to findByHashedUrlAndUserId
Signed-off-by: Olivier Mehani <shtrom@ssji.net>
2019-05-24 15:17:46 +02:00
Jérémy Benoist a2b5d67560
Merge pull request #3960 from wallabag/api-entries-2817
api/entries: add parameter detail to exclude or include content in response
2019-05-21 11:18:19 +02:00
Kevin Decherf 2c290747cb api/entries: add parameter detail to exclude or include content in response
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>
2019-05-18 18:11:08 +02:00
Jeremy Benoist 9f0957b831
Merge remote-tracking branch 'origin/master' into 2.4 2019-05-15 14:38:07 +02:00
Jeremy Benoist f45496336f
Add ability to match many domains for credentials
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.
2019-04-23 22:39:31 +02:00
Jeremy Benoist c579ce2306
Some cleanup
Also, do not run the hashed_url migration into a Doctrine migration
2019-04-01 14:34:20 +02:00
Jeremy Benoist 9c2b2aae70
Keep url in exists endpoint
- Add migration
- Use md5 instead of sha512 (we don't need security here, just a hash)
- Update tests
2019-04-01 13:24:40 +02:00
Jeremy Benoist 0182cdaec4
CS 2019-02-11 11:57:52 +01:00
Jeremy Benoist 091bafeb4c
Handle no random result found 2019-01-19 22:30:50 +01:00
Jeremy Benoist 50f35f0db2
Move icon into the top menu bar
Change the way to select a random entry:
- select all ids from the given user (with filters)
- choose randomly one in php
- find that entry
2019-01-19 22:24:10 +01:00
Jeremy Benoist 9a57653aec
Redirect to the current view instead of homepage 2019-01-19 21:10:16 +01:00
Jeremy Benoist 062fad434a
Better random function 2019-01-19 21:09:33 +01:00
Jeremy Benoist f85d220c19
Fix tests 2019-01-19 21:09:33 +01:00
Nicolas Lœuillet 09ef25c3c3
Added random feature 2019-01-19 21:09:32 +01:00
Jeremy Benoist 3afc87426d
CS 2019-01-15 09:49:22 +01:00
Jeremy Benoist 5419a8368e
Merge remote-tracking branch 'origin/master' into 2.4 2019-01-15 09:41:18 +01:00
Jeremy Benoist 78e3fafa3f
Avoid error when a bad order parameter is given
Only allowed parameter are asc & desc
2019-01-14 17:01:21 +01:00
Kevin Decherf 2a0e0a47d8 TagRestController: rewrite delete actions to only retrieve tags related to the user
Fixes #3815

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2018-12-30 01:34:49 +01:00
Kevin Decherf 6708bf238d TagRepository: refactor query builder for queries by userId
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2018-12-30 01:34:44 +01:00