aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib/Trashbin.php
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* Add visibility to all constantsChristoph Wurst2020-04-101-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-11/+5
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use elseif instead of else ifChristoph Wurst2020-04-101-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-261-22/+22
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-051-2/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* set retention obligation on existing `expiration` in testsRobin Appelman2019-11-041-3/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Do not create Application instances directlyChristoph Wurst2019-10-111-3/+6
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update apps/files_trashbin/lib/Trashbin.phpRobin Appelman2019-09-041-1/+3
| | | Co-Authored-By: Morris Jobke <hey@morrisjobke.de>
* dont try to copy trash items to user if the user has not enough free spaceRobin Appelman2019-07-291-1/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* dont try to restore a trashbin item to a readonly targetRobin Appelman2019-03-141-0/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Only fetch size of this storage without mount points - ref #14412Morris Jobke2019-03-011-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Revert "Fix for issue 10862: calculation of free space ignores external ↵Morris Jobke2019-03-011-4/+5
| | | | | | | | storage (doesn't count towards quota)" This reverts commit e806aa658c16fadad465504fab4aeef314832bdb. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix for issue 10862: calculation of free space ignores external storage ↵Felix Nieuwenhuizen2019-01-261-5/+4
| | | | | | (doesn't count towards quota) Signed-off-by: Felix Nieuwenhuizen <felix@tdlrali.com>
* fix select statementRobin Appelman2018-10-171-2/+0
| | | | | | | | | | | | | | | fix select statement Make trashbin api modules Apps can register trashbin backends for specific storages, allowing them to modify trashbin behavior for storages The old trashbin implementation has been wrapped in a "legacy" backend, for future work this can be replaced with a new backend that better handles shares while still keeping the legacy backend around to keep existing trash from being accessible Signed-off-by: Robin Appelman <robin@icewind.nl>
* Improved logging statementLars Knickrehm2018-06-241-4/+1
|
* Workaround for interrupting expired files deletionLars Knickrehm2018-05-281-2/+9
| | | Workaround avoiding "Error while running background job (class: OCA\Files_Trashbin\BackgroundJob\ExpireTrash, arguments: ): {"Exception":"OCP\\Files\\NotPermittedException","Message":"","Code":0,"Trace":"#0 \/var\/www\/cloud\/apps\/files_trashbin\/lib\/Trashbin.php(590): OC\\Files\\Node\\File->delete() [...]"
* Less deprecated calls to OCP\Util::writeLogMorris Jobke2018-04-221-5/+5
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Remove deprecated URL functions for OCP\UtilRoeland Jago Douma2018-03-131-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove unneeded semicolon and parenthesesMorris Jobke2018-01-261-2/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Cleanup unused codeMorris Jobke2018-01-261-2/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Change @georgehrke's emailMorris Jobke2017-11-061-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headersMorris Jobke2017-11-061-1/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix comparisions in the trashbin appJoas Schilling2017-08-011-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Delete trash using node API to trigger preview deletionRoeland Jago Douma2017-07-241-6/+23
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Improve logging of trash bin inconsistenciesMorris Jobke2017-06-231-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update comments to NextcloudMorris Jobke2017-04-111-1/+1
| | | | | | | * based on PR by @Ardinis * see #4311 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use the expected method depending on the target being a file or folderJuan Pablo Villafáñez2017-03-221-1/+5
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add proper default value for datadirMorris Jobke2017-01-191-1/+1
| | | | | | | * better safe than sorry * fixes #3091 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #2819 from nextcloud/trash-ext-link-uselinkownerRoeland Jago Douma2016-12-231-0/+10
|\ | | | | Fallback to share link owner when no owner found
| * Fallback to share link owner when no owner foundVincent Petry2016-12-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | When creating link shares from external storage, the filesystem cannot find an owner in some scenarios (ex: system-wide mounts). In such cases, fall back to using the current user's trashbin which happens to also be the user who created the link share. Fixes an issue where this scenario made deletion impossible due to missing user information. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* | add a copy to the owners trash bin if another user moves a file out of a ↵Bjoern Schiessle2016-12-211-3/+5
|/ | | | | | shared folder Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Also fire a bulk pre- and post-delete hookSteven Bühner2016-09-201-3/+14
|
* Always use the same relative Path (Starting from users home dir. i.e.: ↵Steven Bühner2016-09-201-4/+7
| | | | "/files_trashbin/...")
* Take the same path (with /USERNAME/ as base) for every emmited hooksSteven Bühner2016-09-201-2/+2
|
* Emit hooks for each file before and after all files in trashbin have been ↵Steven Bühner2016-09-201-23/+23
| | | | deleted.
* Fiy typoSteven Bühner2016-09-201-1/+1
|
* Emit Hooks for each file bevore and after all files in trashbin have been ↵Steven Bühner2016-09-201-3/+32
| | | | deleted.
* Update with robinJoas Schilling2016-07-211-1/+1
|
* Fix apps/Joas Schilling2016-07-211-2/+3
|
* Update license headersLukas Reschke2016-05-261-2/+3
|
* Move files_trashbin to PSR-4 (#24570)Joas Schilling2016-05-121-0/+926