Commit Graph

25 Commits (feat/database/query-result-fetch-associative-fetch-num)

Author SHA1 Message Date
Louis Chemineau cec0b310a5 Move module versions management logic out of main logic
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-09-07 15:47:59 +07:00
Louis Chemineau c3475f4dbb Fix initialisation of versions in the DB
Broken after https://github.com/nextcloud/server/pull/36690

Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-05-25 23:43:40 +07:00
Max 337fc110ec
fix: catch ManuallyLockedException and use app context
The files_lock app may throw ManuallyLockedExceptions
when attempting to revert a file that is currently opened.
This would prevent the user from rolling back a opened file.

Text and Richdocuments handle changes of the file while editing.
Allow reverting files even when they are locked by these apps
and let the apps handle the conflict.

Signed-off-by: Max <max@nextcloud.com>
2023-05-03 09:52:36 +07:00
Julius Härtl 2e1a560867
Merge pull request #36690 from nextcloud/bugfix/noid/rollback-hook 2023-04-14 17:09:17 +07:00
Côme Chilliet ea05544213
Fix return type of methods returning false on error
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-03 10:52:34 +07:00
Julius Härtl f00f4244d4
fix: Check return type on rollback
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-03-13 10:59:33 +07:00
Robin Appelman 62e6a32899
don't re-get fileinfo for versioned file if it's not shared
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-03-13 10:52:37 +07:00
Julius Härtl c22d51c1ad
tests(files_versions): Tear down fs to clear mount cache before testing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-03-13 10:52:37 +07:00
Julius Härtl cf46bd6915
fix: Make sure that rollback hook is triggered on all version backends
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-03-13 10:52:35 +07:00
Côme Chilliet 1765908c03
Document that size may be a float in new class VersionEntity
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:34 +07:00
Louis Chemineau c88328e68e Handle empty files in version creation logic
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-01-26 10:12:23 +07:00
Louis Chemineau 6a2f8bc599 Allow to delete a version through DAV
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-01-26 10:12:23 +07:00
Louis Chemineau 629de6c8c9 Support getting and patching version-label
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-01-26 10:12:23 +07:00
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07: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 +07: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 +07:00
Christoph Wurst 74936c49ea
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:08:08 +07:00
Christoph Wurst df9e2b828a
Fix mismatching docblock return types
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-06 16:38:25 +07: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 +07:00
Roeland Jago Douma 78050ec531
Fix restoring shared versions
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-12-05 16:50:45 +07:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +07: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 +07: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 +07: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 +07: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 +07:00