From ec3aeb3315db201251e48b9d3713b022e7d88188 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sat, 7 Nov 2020 13:58:23 +0000 Subject: [PATCH] Added recycle bin auto-clear lifetime functionality --- .env.example.complete | 8 +++ app/Config/app.php | 7 +++ app/Entities/Managers/TrashCan.php | 25 ++++++++ app/Entities/Repos/BookRepo.php | 1 + app/Entities/Repos/BookshelfRepo.php | 1 + app/Entities/Repos/ChapterRepo.php | 1 + app/Entities/Repos/PageRepo.php | 1 + resources/lang/en/settings.php | 2 +- .../views/settings/maintenance.blade.php | 38 ++++++------- tests/RecycleBinTest.php | 57 +++++++++++++++++-- 10 files changed, 115 insertions(+), 26 deletions(-) diff --git a/.env.example.complete b/.env.example.complete index 39e7b4360..0e62b3ea6 100644 --- a/.env.example.complete +++ b/.env.example.complete @@ -255,6 +255,14 @@ APP_VIEWS_BOOKSHELVES=grid # If set to 'false' a limit will not be enforced. REVISION_LIMIT=50 +# Recycle Bin Lifetime +# The number of days that content will remain in the recycle bin before +# being considered for auto-removal. It is not a guarantee that content will +# be removed after this time. +# Set to 0 for no recycle bin functionality. +# Set to -1 for unlimited recycle bin lifetime. +RECYCLE_BIN_LIFETIME=30 + # Allow