aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository/EntryRepository.php
Commit message (Collapse)AuthorAgeFilesLines
* Use two indexes instead of one for hashed urlsJeremy Benoist2019-06-051-1/+12
| | | | | 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.
* Use hash given url to avoid duplicateJeremy Benoist2019-05-291-1/+1
| | | | Using hashed url we can ensure an index on them to ensure it's fast.
* Added given_url in entry tableNicolas Lœuillet2019-05-291-0/+1
| | | | | | | | | | - 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`.
* Remove useless methodsJeremy Benoist2019-05-241-26/+0
| | | | Also fix a phpdoc block
* Change the way to define algorithm for hashing urlJeremy Benoist2019-05-241-1/+2
|
* Add Wallabag\CoreBundle\Helper\UrlHasherOlivier Mehani2019-05-241-1/+28
| | | | Signed-off-by: Olivier Mehani <shtrom@ssji.net>
* Delegate findByUrlAndUserId to findByHashedUrlAndUserIdOlivier Mehani2019-05-241-11/+3
| | | | Signed-off-by: Olivier Mehani <shtrom@ssji.net>
* api/entries: add parameter detail to exclude or include content in responseKevin Decherf2019-05-181-1/+16
| | | | | | | | | | | | 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>
* Some cleanupJeremy Benoist2019-04-011-3/+3
| | | | Also, do not run the hashed_url migration into a Doctrine migration
* Keep url in exists endpointJeremy Benoist2019-04-011-0/+24
| | | | | | - Add migration - Use md5 instead of sha512 (we don't need security here, just a hash) - Update tests
* Handle no random result foundJeremy Benoist2019-01-191-1/+6
|
* Move icon into the top menu barJeremy Benoist2019-01-191-21/+12
| | | | | | | 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
* Redirect to the current view instead of homepageJeremy Benoist2019-01-191-17/+16
|
* Better random functionJeremy Benoist2019-01-191-9/+13
|
* Fix testsJeremy Benoist2019-01-191-0/+5
|
* Added random featureNicolas Lœuillet2019-01-191-4/+42
|
* Merge remote-tracking branch 'origin/master' into 2.4Jeremy Benoist2019-01-151-1/+5
|\
| * Avoid error when a bad `order` parameter is givenJeremy Benoist2019-01-141-1/+5
| | | | | | | | Only allowed parameter are asc & desc
* | Sort archive page by archived atJeremy Benoist2018-09-211-1/+1
| |
* | Code StyleSébastien Viande2018-09-211-1/+1
| |
* | Entry: add sort parameter archivedSébastien Viande2018-09-211-0/+2
|/
* Add missing parametersJeremy Benoist2018-09-071-1/+1
| | | | Parameters weren’t passed to the sub function.
* php-cs-fixerKevin Decherf2018-09-051-7/+7
| | | | Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
* EntryRepository: refactor getBuilderForUntaggedByUserKevin Decherf2018-09-051-3/+16
| | | | | | | | | Improve SQL performance by replacing size(e.tags) with a left join and a null condition Move the QueryBuilder logic into getRawBuilderForUntaggedByUser Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
* EntryRepository: refactor getBuilderByUserKevin Decherf2018-09-051-12/+38
| | | | | | | | | | | | We refactor getBuilderByUser to separate QueryBuilder getter and the orderBy(). The previous code of getBuilderByUser() has been moved to getSortedQueryBuilderByUser(). getBuildByUser() now returns a QueryBuilder without the call to orderBy(). A new method named sortQueryBuilder() returns a given QueryBuilder with an orderBy() call using given sort parameters. Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
* php-cs-fixerKevin Decherf2018-09-051-2/+2
| | | | Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
* Fix #3361 check type for tags in entry repositorySébastien Viande2017-10-121-1/+1
| | | | Check is $tags is a string before explode
* Remove unused functionJeremy Benoist2017-09-061-20/+0
| | | | Introduce after the rebase I guess
* Fix testsJeremy Benoist2017-09-061-1/+1
|
* Multiple tag search was broken from APIJeremy Benoist2017-09-061-5/+40
| | | | | | | | | | First, the setParameter() were done on the same parameter which in fact just duplicated the condition in the SQL query (like `where t.label = 'test' and t.label = 'test'`. Changed the parameter doesn't help because the query was then wrong. Changing the way to match associated tags for an entry and it worked.
* Set a starred_at field when an entry is starred.François D2017-08-251-5/+6
| | | | | | | | This date is used to sort starred entries. Can not use Entry::timestamps method otherwise starred_at will be updated each time entry is updated. Add an updateStar method into Entry class A migration script has been added in order to set starred_at field.
* rename getAllEntriesIdAndUrl into findAllEntriesIdAndUrlByUserIdNicolas Hart2017-08-221-1/+1
|
* rename getAllEntriesId into findAllEntriesIdByUserIdNicolas Hart2017-08-221-1/+1
|
* Add reload entry commandNicolas Hart2017-08-211-0/+17
|
* Reduce number of queries on tag listNicolas Hart2017-08-061-20/+0
|
* Fix some namespaces and phpdocNicolas Hart2017-07-291-4/+5
|
* Fix testsJeremy Benoist2017-07-031-2/+2
|
* Add a real configuration for CS-FixerJeremy Benoist2017-07-011-17/+17
|
* Add public filter/field in the APIJeremy Benoist2017-06-101-3/+8
| | | | | | Listing entries can now be filtered by “public”. Creating or patching an entry can now set is to public or remove the public. Entry response now include “is_public” boolean field
* Fixed @j0k3r reviewNicolas Lœuillet2017-05-051-3/+1
|
* Added test for deduplicationNicolas Lœuillet2017-05-051-0/+19
|
* Add Clean Duplicates CommandThomas Citharel2017-05-011-0/+13
|
* Allow to remove all archived entriesThomas Citharel2017-03-311-0/+8
| | | | | | Since we still support fucking SQLite, we need to retrieve all tags & annotations for archived entries before deleting them. Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* Rename method from *username to *userThomas Citharel2017-03-301-1/+1
| | | | Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* Search by term: extend to entries urlKevin Decherf2017-02-161-1/+2
| | | | Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
* Removed outputWalkers for RSS and APINicolas Lœuillet2016-12-151-1/+1
|
* Removed outputWalkers for paginationNicolas Lœuillet2016-12-151-3/+1
| | | | Due to overload, we disabled output walkers (see https://github.com/whiteoctober/Pagerfanta/issues/115
* Removed user join in query builderNicolas Lœuillet2016-12-121-2/+1
|
* Added testsNicolas Lœuillet2016-11-191-2/+1
|
* Added translations and currentRoute parameterNicolas Lœuillet2016-11-191-5/+17
|