Commit Graph

115 Commits

Author SHA1 Message Date
John Molakvoæ (skjnldsv) 3e624dc399
Bump js licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-03-31 12:17:18 +02:00
Morris Jobke d84e1f1951
Re-use fetched dependencies in lib/base.php
Reduces calls to DI container by reusing already fetched dependencies.

For status.php it went from 355 to 344.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2021-01-20 21:55:16 +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
Roeland Jago Douma b7dd2074ab
FIX
the assertAttributeEquals got removed.
So we can't run these tests anymore.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-12-07 15:44:04 +01:00
Morris Jobke f2d05eacc6
VersioningTest:729 is unreliable and should be disabled
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-12 22:03:42 +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
Morris Jobke 234b510652
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-12 13:55:19 +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 a2f34f46b2
Fix tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-24 18:13:37 +02:00
Joas Schilling 89ed2c37bf
Update share type constant usage
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-24 16:49:16 +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 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 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 2ee65f177e
Use the shorter phpunit syntax for mocked return values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:21:27 +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
Roeland Jago Douma c1152af523
Move deprecated aliases over to new registration
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-03-15 15:13:12 +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
Robin Appelman 829f4a1a1b
update tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-12-05 17:31: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
John Molakvoæ (skjnldsv) 5cb11ca642
Fix tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2019-12-02 13:08:43 +01:00
Roeland Jago Douma 3a7cf40aaa
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 15:27:18 +01:00
Roeland Jago Douma c007ca624f
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 13:34:41 +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 e9c972f708
Fix share tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-20 08:08:02 +01: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
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
Daniel Calviño Sánchez 661756b02a Set error expected by the DAV client for a failed move
A revert triggers a move in the DAV client, and the DAV client expects a
DAV error message to be provided by the server in case of failure; if
no error message is given the client ends trying to get an attribute
from an undefined object and "crashes".

Besides that, if the revert fails the "done" callback of the promise
(the first parameter of "then") is never called, so a "fail" callback
should be used instead.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-10-25 13:07:06 +02:00
Daniel Calviño Sánchez 24abfd8869 Wait for the promise to be fulfilled before running the next test
In Jasmine 2.5 the "it" function takes an optional parameter that should
be called when the async work is completed (returning a promise was
introduced in Jasmine 2.7, so it is not supported yet in the tests). If
the parameter is not declared then the next test is executed without
waiting for the asynchronous work in the previous one to finish, which
could cause that asynchronous work to finish while a different test is
being run.

Note that if that happens the test could still work as expected if it
relied only in local variables. However, in the case of the successful
revert tests, the stubs being checked are not the ones created when that
test was initialized, but the ones created when the next test, the
failed revert test, was initialized and the previous variables were
replaced (although the model itself calls the proper stubs, as they are
set through parameters in function calls).

Besides all that, the checks in the failed revert test were never
executed due to a different problem which will be fixed in the next
commit.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-10-25 12:25:41 +02:00
Robin Appelman ee84d83519
move versions webui over to the dav api
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-10-11 20:42:41 +02:00
Joas Schilling 78cc4171ee
Fix mock of ITimeFactory
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-10-10 12:42:20 +02:00
Joas Schilling bf2be08c9f
Fix risky tests without assertions
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-01-25 11:33:25 +01:00
Morris Jobke 31c5c2a592
Change @georgehrke's email
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 20:38:59 +01:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Morris Jobke ab36980d20
Use ::class in test mocks of dav app
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-10-26 10:16:12 +02:00
Morris Jobke 43e498844e
Use ::class in test mocks
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-10-24 17:45:32 +02:00
Roeland Jago Douma b930f32e89
Remove legacy OC_User_Backend and OC_User_Interface
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-07-24 20:42:55 +02:00
Morris Jobke f8044cbbce Proper exception for upload of .htaccess file via WebDAV
* fixes #2860

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-05-08 20:03:41 -05:00
noveens 40228c0c2b
added quit option in commentstabview.js
added quit option in notif in app.js

added quit option in notif in file-upload.js

added quit option in notif in fileinfomodel.js

added quit option in notif in filelist.js

added quit option in notif in filelist.js

added quit option in notif in tagsplugin.js

added quit option in notif in statusmanager.js

added quit option in notif in external.js

added quit option in notif in versionstabview.js

added quit option in notif in notification.js

changes according to the latest review.

timeout removed since there is a button to close it

translation capability added

typo fixed

test files updated

small errors fixed

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-23 13:12:29 -06:00
Vincent Petry 5dbb32fb81
Properly expire ext storage versions (#26601)
* Properly expire ext storage versions

System-wide external storages have no real owner so the current user is
used as owner. However when running cron.php there is no current user,
so no expiry can be done.

This fix adds an user argument to the expire() function to tell for
which user to expire files. This information is anyway always available
now through the expire command job.

* Move version expire setupFS into the expire function

* Add comment about not tearing down in version Storage::expire()

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-03-10 15:58:44 -06:00
Roeland Jago Douma 66a77a8857
Fix js tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-29 20:48:03 +01:00
Michael Jobst 96debafd08
Display changes in file versions tab view and detailsView (#26511)
* Display changes in file versions tab view and detailsView

* versions tab enhancements

enhanced js test file
removed css superscript attribute for version size

* Replaced spaces with tabs
2016-11-14 15:22:27 +01:00
Roeland Jago Douma 55af6b45f7
More tests
* PreviewController test
* PublicPreview test
* Versions Preview test
* Trash Preview test

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-03 14:00:33 +01:00
Joas Schilling 246bb9f33d
Move OC\Files\Storage\Shared to the right namespace 2016-10-20 20:27:44 +02:00