Morris Jobke
264250937e
Return all keys in getAllVersions() instead
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-13 15:46:34 +00:00
Christoph Wurst
92ac576e1c
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-13 15:46:31 +00: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
Robin Appelman
4403d771ad
modular versions api
...
Allows apps to register version backends for storage types
The existing versions backend is wrapped in a "legacy" backend.
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-11-01 00:21:48 +01:00
Georg Ehrke
367ca563b4
allow admins to override FreeBusy capabilities without modifying ShareAPI capabilities
...
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2018-05-22 19:16:26 +02:00
Roeland Jago Douma
39bb9c06d1
Delete the previews when a version is restored
...
Fixes #9469
When a version of a file is restored the previews are no longer valid.
Thus we should remove them so they are regenerated.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-14 19:58:19 +02:00
Roeland Jago Douma
cd53498256
Use more magic DI in files_versions
...
There is no need to register this. The system can figure out by itself
what it needs to do :)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-11 22:25:07 +02:00
Roeland Jago Douma
17f1653ceb
If not in debug disable principal listing
...
Trashbin and Version should have the same behaviour as the other
collections.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-08 20:52:14 +02:00
Roeland Jago Douma
5401732cd2
Allow to read get old versions
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-01 08:38:59 +02:00
Roeland Jago Douma
dd47ebb062
Add rollback
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-01 08:38:59 +02:00
Roeland Jago Douma
d40afac1b9
Add version collection to DAV
...
listed as
versions/<username>/versions/<file id>/<timastamp>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-01 08:38:59 +02:00
Morris Jobke
dd34cb7540
Less deprecated calls to OCP\Util::writeLog
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-04-22 20:41:49 +02:00