aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib/Trashbin.php
Commit message (Collapse)AuthorAgeFilesLines
* chore: Apply new rector configuration to apps folderCôme Chilliet2025-02-131-33/+37
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(apps): Fix wrong or missing castsfix/apps/wrong-missing-castsprovokateurin2024-10-231-1/+1
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* refactor(apps): Use constructor property promotion when possibleprovokateurin2024-10-211-1/+2
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* chore(apps): Apply new rector configuration to autouse classesCôme Chilliet2024-10-151-15/+18
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* feat(trashbin): Port files trashbin events to IEventDispatcher/IEventListenerCarl Schwan2024-09-231-8/+16
| | | | | | | | oc_hooks is deprecated and will at some point be removed Signed-off-by: Carl Schwan <carl@carlschwan.eu> Signed-off-by: Thomas Citharel <tcit@tcit.fr> Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: improve moving object store items to trashbinobject-store-trash-moveRobin Appelman2024-09-191-11/+8
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-191-1/+1
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* chore: Improve typing and phpdoc commentsCôme Chilliet2024-09-161-2/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore: Fix psalm issues, put back private versions of getter in private ↵Côme Chilliet2024-09-161-3/+4
| | | | | | Storage interface Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-4/+4
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Merge branch 'master' into jr-readdir-false-falseJohn Molakvoæ2024-08-161-62/+84
|\ | | | | Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
| * feat: add base class for extending the query builderRobin Appelman2024-07-121-4/+4
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * chore: Add SPDX headerAndy Scherzinger2024-06-021-41/+3
| | | | | | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
| * chore(trashbin): Add method to get deleted by from trash itemChristopher Ng2024-04-231-9/+8
| | | | | | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
| * chore(trashbin): Store deleted by userChristopher Ng2024-04-231-2/+4
| | | | | | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
| * chore: Replace OC::$server->getL10N by OCP\Util::getL10N in lib and some appsCôme Chilliet2024-02-051-1/+1
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * Synchronize operation on live photo filesLouis Chemineau2023-11-291-4/+61
| | | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
| * chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-2/+2
| | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
| * Support getting and setting metadata in DAV requestsLouis Chemineau2023-11-081-1/+3
| | | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | Clean-up some remaining readdir calls with undesirable false evaluation ↵Josh Richards2023-06-241-1/+1
|/ | | | | | potential Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
* Correctly react to bad configurationCôme Chilliet2023-06-081-13/+23
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Do not cast sizes to int in Trashbin classCôme Chilliet2023-06-081-29/+24
| | | | | | This helps with 32bits support Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(trashbin): Truncate long filenamesChristopher Ng2023-05-311-14/+33
| | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* fix(files_trashbin): Remove unnecessary scanner logic when getting versions ↵Julius Härtl2023-02-021-24/+0
| | | | | | from trash Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix typos in apps/ subdirectoryluz paz2022-09-051-1/+1
| | | | | | | Found via `codespell -q 3 -S l10n,./apps/files_external/3rdparty -L adn,ba,boxs,keypair,jus,optionel,ressource,tabel ./apps/` Signed-off-by: luz paz <luzpaz@github.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* Remove OCP\App and OCP\BackgroundJobCarl Schwan2022-08-011-3/+4
| | | | | | | | | | Both deprecated since NC 23 IAppManager is the replacement for OCP\App unfortunately it can't be dependency injected in classes used by the installed otherwise the database connection is initialised too early Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* use size from cache to determine whether to skip the trashbinRobin Appelman2022-06-291-5/+11
| | | | | | this way large folders also get skipped Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix psalm errors fron the end of the baseline fileCarl Schwan2022-05-161-1/+1
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Adapt more code to migration to LoggerInterfaceCôme Chilliet2022-03-241-8/+14
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Don't die with LockedException when removing/restoring multiple files from trashSven Strickroth2021-08-191-3/+14
| | | | | | fixes issue #16491 Signed-off-by: Sven Strickroth <email@cs-ware.de>
* rework search api to allow searching on multiple caches at onceRobin Appelman2021-06-141-3/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Drop \OCP\UserChristoph Wurst2021-05-211-8/+8
| | | | | | Inlines and remaining usages and drops the deprecated public API. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix usage of rename executeUpdateChristoph Wurst2021-05-051-6/+6
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Cleanp execute usage in the trashbinRoeland Jago Douma2021-03-111-9/+9
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-1/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Don't leave cursors open when tests failJoas Schilling2020-11-091-1/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use query builder instead of OC_DB in trashbinJoas Schilling2020-11-061-21/+56
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Restrict query when searching for versions of trashbin filesJulius Härtl2020-10-141-14/+43
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* dont hold a transaction during the move to trashRobin Appelman2020-09-301-5/+7
| | | | | | because moving to trash can take a long time, keeping a transaction active for the duration can lead to issues Signed-off-by: Robin Appelman <robin@icewind.nl>
* Delete files that exceed trashbin size immediatelyJulius Härtl2020-09-231-0/+8
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update license headers for Nextcloud 20 (again)Christoph Wurst2020-09-071-0/+1
| | | | | | | There are still lots of outdated headers, so time for another round of updates. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Change free space calculationDaniel Kesselberg2020-08-311-4/+6
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Merge pull request #21954 from nextcloud/techdebt/noid/bootstrap-files_trashbinblizzz2020-08-071-14/+0
|\ | | | | Use IBootstrap for the files_trashbin app
| * Use IBootstrap for the files_trashbin appMorris Jobke2020-07-231-14/+0
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | fix object store trashbin handlingRobin Appelman2020-07-301-3/+10
| | | | | | | | | | | | object stores are "special" given how they interact with the cache on their own Signed-off-by: Robin Appelman <robin@icewind.nl>
* | rollback cache rename if trashbin move failsRobin Appelman2020-07-231-0/+5
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix moving files from external storage to object store trashbinRobin Appelman2020-07-231-2/+2
|/ | | | | | | | | | | | having the "cache rename" after the "storage move" caused the target to get the fileid from the source file, without taking care that the object is stored under the original file id. By doing the "cache rename" first, we trigger the "update existing file" logic while moving the file to the object store and the object gets stored for the correct file id Signed-off-by: Robin Appelman <robin@icewind.nl>
* allow admin to configure the max trashbin sizeRobin Appelman2020-07-071-0/+10
| | | | | | | | this allows an admin to configure the max trashbin size instead of always relying on the users quota. The trashbin size can be configured using the `occ trash:size` command and can be set both globally and per-user Signed-off-by: Robin Appelman <robin@icewind.nl>
* add locking to resolve concurent move to trashbin conflictsRobin Appelman2020-05-061-13/+39
| | | | | | | uses a lock to prevent two requests from moving a file to the trashbin concurrently (causing sql duplicate key errors) Signed-off-by: Robin Appelman <robin@icewind.nl>