Commit Graph

419 Commits

Author SHA1 Message Date
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 42625a46be
Remove spaces after method or function call
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:05:56 +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
Joas Schilling 3ea37d0d10
Show the displayname instead of the user id
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-04-08 16:09:03 +02:00
Joas Schilling f8a5812f98
Try to use the display name of file transfers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-04-08 15:41:20 +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
John Molakvoæ 9fda1ee39f
Merge pull request #19777 from nextcloud/fix/viewer-public
Properly emit Viewer event on files and files_sharing
2020-03-12 08:47:14 +01:00
John Molakvoæ (skjnldsv) 3cdadeb9e9 Use dispatchTyped
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-03-11 09:28:27 +01:00
John Molakvoæ (skjnldsv) 92a6530c0f Properly emit Viewer event on files and files_sharing
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-03-11 09:28:27 +01:00
Joas Schilling f4918f208e
Unify the code a bit
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-03-10 19:36:57 +01:00
Joas Schilling bbef026aa0
Use contacts name on federated activities
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-03-10 19:36:56 +01:00
Joas Schilling 38292753ac
Combine move activities as well
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-03-10 09:32:52 +01:00
Christoph Wurst 68b764bb0f
Do not allow transfer ownership when the user isn't the owner
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-03 14:48:45 +01:00
Julius Härtl 1e8048abee
Make sure that the transfer entry is present in the database
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-02-24 15:01:39 +01:00
Christoph Wurst dd9d4696f2
Merge pull request #19412 from nextcloud/fix/19404/make-favorite-public
Make TAG_FAVORITE public
2020-02-21 17:47:53 +01:00
Daniel Kesselberg 6235175b6d
Make TAG_FAVORITE public
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-02-12 15:11:58 +01:00
Joas Schilling e2ca31119c
Fix event type
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-02-06 15:17:27 +01:00
Roeland Jago Douma 5bc0951267
Allow specifying this is the first login
On firstlogin we allow non empty target folders. So that for guest
transfers the user sees the same UI.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-02-03 11:15:57 +01:00
Tobia De Koninck 055ae9b2cd
Catch \Error in Transfer::restoreShares
This makes the command more fault tolerant. An \Error can happen when
e.g. the owner of a share is null.
If we don't catch this, the restore process will stop in an unknown
state.

Signed-off-by: Tobia De Koninck <LEDfan@users.noreply.github.com>
2020-02-03 11:15:56 +01:00
Tobia De Koninck 97508f69ec
Prevent transferring data to user which never loggedin
Signed-off-by: Tobia De Koninck <LEDfan@users.noreply.github.com>
2020-02-03 11:15:56 +01:00
Tobia De Koninck 7c56144f49
Add option to transfer-ownership to move data
This will move the home folder of own user to another user. Only allowed
if that other user's home folder is empty.
Can be used as workaround to rename users.

Signed-off-by: Tobia De Koninck <LEDfan@users.noreply.github.com>
2020-02-03 11:15:56 +01:00
John Molakvoæ (skjnldsv) 613860e0f4
Fix Sidebar legacy FileInfoModel requirement
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-01-16 15:07:57 +01:00
John Molakvoæ (skjnldsv) 22079347ea
Fix webdav url
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-01-10 12:13:05 +01:00
Roeland Jago Douma 04031f606a
Merge pull request #18478 from nextcloud/fix/direct-editing-invalid-editor-id
Do not generate tokens for editor IDs that do not exist
2019-12-22 14:27:28 +01:00
Julius Härtl 0ddb9c0136
Expose exception message in the response
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-12-20 11:10:33 +01:00
Christoph Wurst 1b46621cd3
Update license headers for 18
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-20 09:23:25 +01:00
Sascha Wiswedel a1df5d1e98
added line breaks to incoming transfer notification
wrapped notifications into double quotes to make line breaks possible

Signed-off-by: Sascha Wiswedel <sascha.wiswedel@nextcloud.com>
2019-12-17 10:38:15 +01:00
Sascha Wiswedel 6a6b6dd1a4
added patience note for sharee
note about incoming transfer taken out by background job

resolves #18272

Signed-off-by: Sascha Wiswedel <sascha.wiswedel@nextcloud.com>
2019-12-17 10:38:14 +01:00
Sascha Wiswedel a64b5de491
transfer ownership dialog word choice
Use Reject instead of Decline


Signed-off-by: Sascha Wiswedel <sascha.wiswedel@nextcloud.com>
2019-12-17 10:38:14 +01:00
Sascha Wiswedel f567566803
notification polishing
Signed-off-by: Sascha Wiswedel <sascha.wiswedel@nextcloud.com>
2019-12-17 10:38:14 +01:00
Sascha Wiswedel f1319e1bc5
Transfer ownership function polishing
Signed-off-by: Sascha Wiswedel <sascha.wiswedel@nextcloud.com>
2019-12-17 10:38:12 +01:00
blizzz c96aa7e1a8
Merge pull request #18359 from nextcloud/fix/18271/dismiss_transfer_ownership_notification
Dismiss transferownership notification cancels transfer
2019-12-13 15:28:25 +01:00
Christoph Wurst b81b824da1
Add typed events for the filesystem/scanner
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-13 09:41:05 +01:00
Roeland Jago Douma 3f21b7b70a
Dismiss transferownership notification cancels transfer
Fixes #18271

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-12-11 12:58:44 +01:00
Roeland Jago Douma 9a40ccfbf0
Merge pull request #18224 from nextcloud/bugfix/noid/direct-editing-path
Use file path for direct editing
2019-12-11 11:17:26 +01:00
Joas Schilling 059968e1c7
Pick a shorter name for the transfer ownership table
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-12-10 11:01:26 +01:00
Roeland Jago Douma 0360ab408e
Merge pull request #18256 from nextcloud/files-aditional-scripts-new-events
Use non-depricated events for loading additional scripts in files app
2019-12-09 21:24:55 +01:00
Daniel Kesselberg 0016480370
Decouple resource provider registration
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-12-07 22:04:07 +01:00
Roeland Jago Douma 4bf5a23ec0
Merge pull request #18242 from nextcloud/directEditingEditorWithId
add id to editor of direct editing
2019-12-05 19:48:50 +01:00
Robin Appelman 7d1206f6f2
use OCP\EventDispatcher\GenericEvent for loading additional scripts in the files app
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-12-05 16:05:18 +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
Julius Härtl e29a76bc79
Use file path for direct editing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-12-05 09:54:58 +01:00
tobiasKaminsky fdaf9aed1f
add id to editor of direct editing
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2019-12-05 09:45:07 +01:00
Roeland Jago Douma 50985e5461
Merge pull request #17913 from nextcloud/fix/transfer-ownership-move-files-error-handling
Catch file transfer error and stop transfer ownership command
2019-12-04 13:53:43 +01:00
John Molakvoæ bfb9ccec1f
Fix files app LoadSidebar event (#18213)
Fix files app LoadSidebar event
2019-12-04 12:47:40 +01:00
John Molakvoæ (skjnldsv) 241aac9f94 Fix files app LoadSidebar event
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2019-12-04 08:07:42 +00:00
Joas Schilling b721095507
Fix mixed up message and subject on notifications for file transfer
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-12-03 17:52:33 +01:00
Christoph Wurst 08a1b928aa
Also allow transfer ownership of files
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-02 15:28:49 +01:00
Roeland Jago Douma 5274c54268
Add a transfer ownership background job
This job can be initiated by a user to transfer a file/folder to a
target user.

The target user will have to accept the job.
Once that is done the transfers is initiated in the background.

Both parties get notified when the job is done.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-12-02 15:28:47 +01:00
Julius Härtl bde624b074
Only expose link to info endpoint in capabilties
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-11-27 19:56:45 +01:00
Julius Härtl fb1b88ac63
Expose editor id for creators
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-11-27 19:56:44 +01:00
Julius Härtl 329e8c2604
Add mimetype to creators
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-11-27 19:56:44 +01:00
Julius Härtl 9a2694fcb0
Code style fixes and cleanup
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-11-27 19:56:40 +01:00
Julius Härtl bc36cc808f
Move editor list to capabilities
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-11-27 14:36:21 +01:00
Julius Härtl 103c6fb39e
Add background job for token cleanup
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-11-27 14:36:20 +01:00
Julius Härtl e52793c69e
Direct editing API to allow file editing using a one-time token for
mobile apps

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-11-27 14:36:20 +01:00
Christoph Wurst 70f4e7e10a
Catch file transfer error and stop transfer ownership command
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-11-27 09:21:17 +01:00
Christoph Wurst 07c5f3775c
Extract transfer ownership logic into a reusable service
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-11-26 08:50:19 +01:00
Roeland Jago Douma a9fb567621
Merge pull request #18107 from nextcloud/undefined-index-owner
dont throw undefined index errors for storages that have no owner set
2019-11-25 20:53:02 +01:00
Robin Appelman f2848fc17c
dont throw undefined index errors for storages that have no owner set
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-11-25 15:17:15 +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
Roeland Jago Douma fc4c107788
Check quota before transfer ownership
Fixes #15664

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-13 11:22:19 +01:00
Robin Appelman 5b2af1cb82
add option to disable background scanning of files
when using (only) object store this job doesn't do any scanning anyway,
but all the setup can still be expensive on large setups

Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-11-05 13:17:05 +01:00
John Molakvoæ (skjnldsv) d88b93c919 Add LoadSidebar event
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-10-29 13:20:07 +01:00
Roeland Jago Douma 606b4d5bf3
Add new LoadAdditionalScriptsEvent
This adds a new event that is in the new style of event dispatching.
This should allow more lazy loading and better sepeartion of concerns

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-09-23 10:09:57 +02:00
Roeland Jago Douma 2d9feca0a3
Lets use DI where we can
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-08-02 20:43:50 +02:00
Morris Jobke eaabe97373
Merge pull request #16200 from nextcloud/revert/16049-wrong-round
Revert incorrect rouding
2019-07-03 10:02:52 +02:00
Morris Jobke 0d0850746e
Merge pull request #15741 from mxss/fix/phpdoc-fixes
misc phpdoc fixes
2019-07-02 22:25:41 +02:00
Daniel Kesselberg 63ef389db1
Revert parts hide quota bar if unlimited
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-07-02 19:50:31 +02:00
Daniel Kesselberg d059ee34a0
Show used space in mb instead of %
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-06-24 18:33:10 +02:00
Julius Härtl 2d06ea5cfc
Properly redirect if accessing invalid file though /f/ entrypoint
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-06-18 13:09:38 +02:00
Max Kovalenko a83b79c5f8
misc phpdoc fixes
Signed-off-by: Max Kovalenko <mxss1998@yandex.ru>
2019-05-27 09:04:05 +03:00
Max Kovalenko a8ddf3471e
fixed phpdoc parameter types
Signed-off-by: Max Kovalenko <mxss1998@yandex.ru>
2019-05-27 09:04:05 +03:00
Joas Schilling 3022ef687a
Use rich objects instead of name, link and icon
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-19 13:06:55 +01:00
Joas Schilling 403b673b93
Replace the icon-class with an absolute link to an image
Otherwise the icon can not be displayed in mobile apps

Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-19 13:06:55 +01:00
Morris Jobke 37b1a9c4ea
Import needed class
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-14 16:28:01 +01:00
Joas Schilling 5e5c5a16dc
Add correct method for hardcoded `/f/{fileid}`
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-14 15:13:56 +01:00
Joas Schilling c6a69ba925
Remove the upload and memory setting
* Remove unneeded private method phpFileSize()
* Bump autoloader
* Remove setUploadLimit tests
* Remove integrity check hacks for upload limit

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-04 12:14:22 +01:00
Julius Härtl f0e50bcb74
Fetch node and filename also if access cache was used
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-03-01 20:57:01 +01:00
Joas Schilling fdfe984adb
Register providers via class names
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-01 20:57:00 +01:00
Joas Schilling 55ae7fa2a4
Invalidate the cache when a share is updated
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-01 20:56:59 +01:00
Joas Schilling 1a73cab3db
Fix doc block
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-01 20:56:59 +01:00
Joas Schilling 59c92a7513
Further work on the access cache
Searching for all is still a problem

Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-01 20:56:19 +01:00
Julius Härtl 31340b8be9
Add icon for resource type and icons for folder/file
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-03-01 20:56:18 +01:00
Julius Härtl 3777df64ae
Add link to resource provider
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-03-01 20:56:18 +01:00
Julius Härtl 506eb885bc
Only call resource provider if type matches
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-03-01 20:56:17 +01:00
Julius Härtl d85e3e3a6d
Allow apps to register resource providers
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-03-01 20:56:17 +01:00
Julius Härtl 88aa3de784
Add iconClass to resources
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-03-01 20:56:17 +01:00
Joas Schilling 702dcfb728
Make names mandatory
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-01 20:56:16 +01:00
Joel S 27aafa77db Fix occ files:scan-app-data elapsed time
Signed-off-by: Joel S <joel.devbox@protonmail.com>
2019-02-22 20:55:24 +05:30
Joel S f29b092a76 Fix-13911-occ-files-scan-elapsed-time
Signed-off-by: Joel S <joel.devbox@protonmail.com>
2019-02-22 19:59:03 +05:30
Joas Schilling 0ba9e3b8bd
Make the yellow favorite icon non-monochrome
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-01-22 16:13:29 +01:00
Joas Schilling 55cd351324
Add icon to restore activity
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-01-22 15:37:07 +01:00
John Molakvoæ (skjnldsv) d526ab55fb
Fix default filepicker style and gridview
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-29 14:05:10 +01:00
John Molakvoæ (skjnldsv) 1deda8fd65
Rollback to default list view
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-15 20:29:10 +01:00