diff options
author | Thomas Citharel <tcit@tcit.fr> | 2017-03-30 16:24:59 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2017-03-31 10:46:05 +0200 |
commit | 6da1aebc946e6448dd0d5080ee88e79c2bae4666 (patch) | |
tree | 43d350623f225ee560e040cd361d628454f2b1a7 /src/Wallabag/CoreBundle/Repository/EntryRepository.php | |
parent | fa884b30ba0f8cb4231bd37fff23ef2f41ae6cfa (diff) | |
download | wallabag-6da1aebc946e6448dd0d5080ee88e79c2bae4666.tar.gz wallabag-6da1aebc946e6448dd0d5080ee88e79c2bae4666.tar.zst wallabag-6da1aebc946e6448dd0d5080ee88e79c2bae4666.zip |
Allow to remove all archived entries
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>
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Repository/EntryRepository.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index 9325d261..1f22e901 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php | |||
@@ -371,4 +371,12 @@ class EntryRepository extends EntityRepository | |||
371 | ->setParameter('userId', $userId) | 371 | ->setParameter('userId', $userId) |
372 | ->execute(); | 372 | ->execute(); |
373 | } | 373 | } |
374 | |||
375 | public function removeArchivedByUserId($userId) | ||
376 | { | ||
377 | $this->getEntityManager() | ||
378 | ->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\Entry e WHERE e.user = :userId AND e.isArchived = TRUE') | ||
379 | ->setParameter('userId', $userId) | ||
380 | ->execute(); | ||
381 | } | ||
374 | } | 382 | } |