Commit Graph

404 Commits

Author SHA1 Message Date
Julius Härtl 2616a784c9
Restrict query when searching for versions of trashbin files
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-10-14 16:38:30 +02:00
Christoph Wurst d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +02:00
Robin Appelman e0d688c365
dont hold a transaction during the move to trash
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>
2020-09-30 14:30:54 +02:00
Julius Härtl 3c47aaa2b1
Delete files that exceed trashbin size immediately
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-09-23 16:58:18 +02:00
Morris Jobke 930c97a0ef
Fix variable name and add spaces around path in info log line
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-17 08:58:10 +02:00
Christoph Wurst 1f7f93a695
Update license headers for Nextcloud 20 (again)
There are still lots of outdated headers, so time for another round of
updates.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-09-07 14:37:44 +02:00
Daniel Kesselberg 2513b64602
Change free space calculation
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-08-31 23:11:10 +02:00
Christoph Wurst 2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
blizzz a3d30bf4a2
Merge pull request #21954 from nextcloud/techdebt/noid/bootstrap-files_trashbin
Use IBootstrap for the files_trashbin app
2020-08-07 11:12:09 +00:00
Robin Appelman c2c9a6a0e1
fix object store trashbin handling
object stores are "special" given how they interact with the cache on their own

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-30 16:31:56 +02:00
Morris Jobke e84504c4d6
Use IBootstrap for the files_trashbin app
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-23 22:03:14 +02:00
Robin Appelman fcad692b4a
rollback cache rename if trashbin move fails
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-23 15:24:48 +02:00
Robin Appelman 5949849322
fix moving files from external storage to object store trashbin
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>
2020-07-23 15:24:44 +02:00
Morris Jobke 7b250db60b
Merge pull request #21658 from nextcloud/trashbin-configurable-size
allow admin to configure the max trashbin size
2020-07-21 20:46:43 +02:00
Christoph Wurst 9e7426a101
Clean up container usage in files trashbin
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-16 10:29:38 +02:00
Robin Appelman 050e2fe346
allow admin to configure the max trashbin size
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>
2020-07-07 14:45:08 +02:00
Joas Schilling 9001438879
Move files_trashbin to migrations
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-06 16:42:14 +02:00
Joas Schilling d7c0b9cced
Also always return in app commands
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-26 15:12:11 +02:00
Robin Appelman 614acc9419
add locking to resolve concurent move to trashbin conflicts
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>
2020-05-06 20:36:55 +02:00
Christoph Wurst cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +02:00
Christoph Wurst 734c62bee0
Format code according to PSR2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:56:50 +02:00
Christoph Wurst 28f8eb5dba
Add visibility to all constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +02:00
Christoph Wurst 1584c9ae9c
Add visibility to all methods and position of static keyword
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:51:06 +02:00
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
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>
2020-04-10 14:19:56 +02:00
Christoph Wurst 14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +02:00
Christoph Wurst afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +02:00
Christoph Wurst 41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +02:00
Christoph Wurst 1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +02:00
Christoph Wurst 463b388589
Merge pull request #20170 from nextcloud/techdebt/remove-unused-imports
Remove unused imports
2020-03-27 17:14:08 +01:00
Christoph Wurst b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +01:00
Christoph Wurst 74936c49ea
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:08:08 +01:00
Christoph Wurst 6127c288e8 Fix license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-01-13 14:23:49 +01:00
simonspa b3ad27f7db Trash bin: fix exception triggered if no correct fileId is provided.
This fixes #17115

Signed-off-by: Simon Spannagel <simon.spannagel@cern.ch>
2020-01-07 23:47:07 +01:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Georg Ehrke c3748cfee3
respect shareapi_allow_share_dialog_user_enumeration in Principal backend for Sabre/DAV
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-12-03 09:44:07 +01:00
Roeland Jago Douma 68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +01:00
Robin Appelman 136c4ef925
dont expose metadata etag for now
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-11-13 12:39:36 +01:00
Robin Appelman 1b6e647b63
expose filecache extension data in FileInfo
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-11-13 12:39:32 +01:00
John Molakvoæ 13960b69da
Merge pull request #17509 from nextcloud/fix/application-singleton
Fix Application instances created multiple times
2019-11-04 18:18:32 +01:00
Robin Appelman 964dc0a955
set retention obligation on existing `expiration` in tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-11-04 16:54:22 +01:00
Arthur Schiwon e8095cf737
use OCP\EventDispatcher\Event over Symfony's deprecated Event
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-10-17 13:31:48 +02:00
Christoph Wurst 543190f8b3
Do not create Application instances directly
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-10-11 08:33:09 +02:00
Robin Appelman ce433637da
allow trash backends to overwrite the tooltip for trash items
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-10-05 10:23:30 +02:00
blizzz 8c77d3bfb6
Merge pull request #16664 from nextcloud/bugfix/emit-moveToTrash-limit
Emit moveToTrash event only for the deleting user
2019-09-06 17:46:03 +02:00
Roeland Jago Douma d744c04a86
Merge pull request #16534 from nextcloud/trash-copy-free-space
dont try to copy trash items to user if the user has not enough free space
2019-09-04 20:06:43 +02:00
Robin Appelman 9bf8ee701f
Update apps/files_trashbin/lib/Trashbin.php
Co-Authored-By: Morris Jobke <hey@morrisjobke.de>
2019-09-04 13:06:07 +02:00
Roeland Jago Douma f452e23a7d
Merge pull request #16666 from nextcloud/feature/calendar/delegation
Feature/calendar/delegation
2019-08-15 19:30:45 +02:00
Roeland Jago Douma 01a4644cad
Use the proxymapper to obtain valid proxy data
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-08-15 15:41:27 +02:00
Roeland Jago Douma 8e7c287e2a
Use the owner from the storage
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-08-07 16:47:43 +02:00
Jakub Onderka 41f8be47eb files_trashbin: File can be without extension
Signed-off-by: Jakub Onderka <jakub.onderka@gmail.com>
2019-08-07 16:04:09 +02:00