Commit Graph

327 Commits

Author SHA1 Message Date
Robin Appelman b2fb4d898a
dont stop expiring versions if we cant check if the source file still exists
instead continue assuming it still exists

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-02-05 15:06:43 +01:00
Christoph Wurst d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +01:00
Christoph Wurst 12d1c27b7f
Catch storage not available in versions expire command
External storage with session credentials is not accessible without a
user session, hence background jobs and CLI commands can't work with
them. The previously unhandled exception causes logged errors in the
nextcloud log. This patch catches the specific exception and logs it as
warnings. So for a production instance the error won't spam their logs
for this non-recoverable and technically unsolvable error if the minimum
log level is set to the default of 3 (error).

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-11-25 09:28:38 +01:00
Morris Jobke 6ce05bc7d7
Return all keys in getAllVersions() instead
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-12 22:17:06 +02:00
Christoph Wurst 02fa3253fe
Fix undefined index and consequential damages in versions code
If the user has no space and there are no versions, there won't be an
`all` index in the versions entry. Hence this triggers a warning and
becomes `null`, afterwards `count`, `foreach` and friends will happily
throw even more warnings and errors because they don't want to play with
`null`. Thus adding a fallback to an empty array.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-12 22:17:06 +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
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
Christoph Wurst 3b0478773a
Migrate files versions to the PSR container
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-16 15:53:40 +02:00
Morris Jobke 29ffaa5676
Move files_versions to bootstrap mechanism
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-09 14:13:18 +02:00
Joas Schilling 3e0cfa6c32
Add missing return
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-26 15:25:33 +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
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
Liam JACK b6c76f43a1
Fix #19066 - Array offset error due to empty file versions array
Signed-off-by: Liam JACK <liamjack@users.noreply.github.com>
2020-04-12 15:35:17 +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 a8a06a82d2
Remove trailing whitespaces from comments
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:09:23 +02:00
Christoph Wurst 44577e4345
Remove trailing and in between spaces
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:07:47 +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 85e369cddb
Fix multiline comments
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-08 22:24:54 +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 df9e2b828a
Fix mismatching docblock return types
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-06 16:38:25 +01:00
Roeland Jago Douma 061b9bb0e7
Merge pull request #18231 from nextcloud/fix/shared_version_restore
Fix restoring shared versions
2019-12-09 21:17:24 +01:00
Roeland Jago Douma 78050ec531
Fix restoring shared versions
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-12-05 16:50:45 +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
John Molakvoæ (skjnldsv) 866c513871
Fix files_versions app LoadSidebar event
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-11-06 10:11:23 +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
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
Roeland Jago Douma c1b8cb2e21
Set the proper filename for version downloads
Before it just used the internalid (timestamp often) which is not really
user friendly.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-10-14 17:55:53 +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
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
Julius Härtl e26187c7ff
Make sure we only fetch the file by id for the actual owner
Otherwise this will fetch all mounts for the file id which is quite
expensive and causes long saving times in big sharing structures

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-08-01 10:10:49 +02:00
Robin Appelman 817bdc47c8
Merge pull request #15869 from nextcloud/multiple-version-backends
fix loading multiple version backends from one app
2019-06-19 14:00:53 +02:00
Robin Appelman a0a3f534f7
allow non integer version ids
currently version ids are timestamps, but for storage provided versions
this is not always the case and they might be strings

Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-06-04 14:15:20 +02:00
Robin Appelman 5209cdccdb
fix loading multiple version backends from one app
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-06-04 14:11:24 +02:00
Robin Appelman ccfbee2af9
add way for version backends to programmatically specify if they should be used
this allows for backends that should only be used if specific conditions are met

Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-05-21 17:14:47 +02:00
Morris Jobke f0c85a0f5f
Merge pull request #6512 from coletivoEITA/add_circles_sharing_to_caldav
Change CALDAV to allow calendars be shared with circles.
2019-03-13 00:06:46 +01:00
Morris Jobke dd2496b275
Use proper dependency injection for app manager
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-05 16:00:47 +01:00
Felix Nieuwenhuizen 56457505af set availableSpace to 0 if userFolder not found
Signed-off-by: Felix Nieuwenhuizen <felix@tdlrali.com>
2019-03-02 13:55:11 +01:00
Felix Nieuwenhuizen 0f43d1dfaa use node API for free space calculation in versions app (same method as trashbin app)
Signed-off-by: Felix Nieuwenhuizen <felix@tdlrali.com>
2019-03-02 13:44:47 +01:00
Roeland Jago Douma 7f88654147
Move of files_versions to webpack
* Move CSS into bundle
* Old merged.json no longer needed!
* No need to load the style still

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-02-13 22:20:07 +01:00
Roeland Jago Douma 6415532508
Allow shared versions again in legacy backend
To make sure that the versions in the legacy backend are shared again we
have to check the storage of a file. Since all shared files are still on
the owners storage.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-01-25 21:10:46 +01:00
Robin Appelman fbe35c346d
actually return the user when creating version dav nodes
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-11-15 17:17:54 +01:00