Commit graph

1656 commits

Author SHA1 Message Date
Julien Veyssier
422e3d9ab5
fix(files_versions): give the version label a min width so it does not get invisible if the author name is long
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2025-06-18 11:47:32 +02:00
Nextcloud bot
1f298806be
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-06-09 00:22:20 +00:00
Nextcloud bot
0359b7c34a
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-06-05 00:22:37 +00:00
Nextcloud bot
b2c3c610e7
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-31 00:22:39 +00:00
Alejo
ab11868bb6 fix(files_versions): "undefined restored" on restore
Signed-off-by: Alejo <xlejo@protonmail.com>
2025-05-29 12:10:39 +02:00
Nextcloud bot
21d79e2308
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-21 00:24:39 +00:00
Joas Schilling
6bb2fc675b
test: Migrate files_versions to PHPUnit 10
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-05-20 21:42:56 +02:00
Ferdinand Thiessen
2dcadd2603
fix(files_versions): only close stream if still open, fixing S3
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-18 16:48:56 +02:00
Nextcloud bot
b9983cbd42
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-18 00:22:42 +00:00
Ferdinand Thiessen
0f69648d0a
fix(files_version): use Storage::writeStream instead of deprecated streamCopy if possible
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-16 17:28:24 +02:00
Ferdinand Thiessen
01db539d0a
chore: move streamCopy implementation from OC_Helper to OCP\Files
The function was already there but called the legacy version.
So moved the implementation and migrated all usages of it.
Sadly the interface was slightly different so adjusted it to be
compatible with both legacy and the OCP one.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-16 13:03:05 +02:00
Kate
8ecadfa6bf
Merge pull request #52820 from nextcloud/refactor/rector-core 2025-05-15 01:42:15 +02:00
provokateurin
82fb8f8508
refactor: Extend rector to core/
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-05-15 00:16:54 +02:00
Côme Chilliet
fd4c103e8b
fix(files_versions): Remove routes leading to deleted ajax files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-14 21:36:33 +02:00
Côme Chilliet
2cd491f491
Merge pull request #48560 from nextcloud/fix/migrate-encryption-away-from-hooks
feat(encryption): Migrate from hooks to events
2025-05-14 19:25:51 +02:00
provokateurin
78a175fc74
refactor: Apply rector refactorings
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-05-14 15:29:02 +02:00
Côme Chilliet
2d8f6b366a chore: Assert rename success in versionning tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +02:00
Côme Chilliet
14872c8040 chore(files_versions): Only mock getSystemValue method to avoid problems in files_versions tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +02:00
Côme Chilliet
536ccf144c feat(encryption): Migrate from hooks to events
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +02:00
Git'Fellow
1b549d4943 fix(files_versions): Folder should not be hardcoed
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2025-05-09 09:35:17 +02:00
Nextcloud bot
88aa80e847
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-30 00:23:19 +00:00
Ferdinand Thiessen
9df998e710
Merge pull request #52369 from nextcloud/fix/files-versions-author
fix(files_versions): wait for version to be created before setting metadata
2025-04-29 11:01:58 +02:00
Nextcloud bot
e5676ce0a9
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-28 00:23:11 +00:00
Ferdinand Thiessen
8ca23f2c7d
fix(files_versions): only handle path updates when there is path
`getPathForNode` can fail with null for various reasons (e.g. no owner),
in this cases we need to just skip the event handling.

Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-04-27 23:51:56 +02:00
Stephan Orbaugh
258983e665
Merge pull request #51355 from AIlkiv/refactor/rollback-hook-usage
refactor: cleanup rollback hook usage
2025-04-25 11:42:20 +02:00
ailkiv
616716cd6a refactor: cleanup rollback hook usage
Signed-off-by: ailkiv <a.ilkiv.ye@gmail.com>
2025-04-25 08:25:11 +00:00
Ferdinand Thiessen
5e03c6fb58
fix(files_versions): create version if previous does not exist
This issue happens reproducible if:
- Versions is disabled
- Upload a file
- Enable versions
- Upload same file unchanged
- Now the error happens.

Problem is that the mtime is unchanged so no version will be created on the upload, but it tries to update the last version which does not exists.
Instead of "upload same file unchanged" you can also - like in the example stack trace above - use Android with an SD card with invalid mtime -> the mtime will be stripped so its always the same.
Instead of disable versions the same also happens if e.g. the versions creation failed due to other issues.

The solution now is to catch the exception and create if not exists.
A cleaner solution would be to have a method on the versions backend
like `hasVersionEntity(File $file, int $revision): bool` but this would
be a breaking change or at least a feature that apps need to implement.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-04-23 16:03:20 +02:00
Ferdinand Thiessen
2020760f88
fix(files_versions): wait for version to be created before setting metadata
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-04-23 13:09:43 +02:00
Nextcloud bot
c337020446
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-18 00:23:31 +00:00
Nextcloud bot
f34466c99e
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-17 00:23:00 +00:00
Nextcloud bot
345167ff18
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-11 00:23:04 +00:00
Nextcloud bot
edeccc897f
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-09 00:23:28 +00:00
Nextcloud bot
815d985470
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-08 00:23:11 +00:00
Nextcloud bot
7b37a58fcc
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-05 00:22:20 +00:00
Nextcloud bot
a54f534797
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-30 12:36:45 +00:00
Nextcloud bot
efa7d59ce9
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-30 00:23:24 +00:00
Nextcloud bot
dd6a0ebd48
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-28 00:23:27 +00:00
provokateurin
07c1aea2f5
fix(files_versions): Rely on server mime fallback icons
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-03-27 08:56:45 +01:00
provokateurin
936166939c
feat(files_versions): Implement preview mime icon fallback
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-03-27 08:56:45 +01:00
provokateurin
89779808e0
fix(files_versions): Cache previews
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-03-27 08:56:45 +01:00
Nextcloud bot
f7b96ba26e
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-27 00:24:00 +00:00
Ferdinand Thiessen
00a1f23913
fix(files_versions): correctly show version author also for shared files
The users endpoint is not available for other users if the current user
has no admin privileges, so instead use the displaynames endpoint.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-03-25 21:33:06 +01:00
Nextcloud bot
bc47dfc075
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-20 00:23:22 +00:00
Nextcloud bot
2d0f50ad7f
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-18 00:23:53 +00:00
Nextcloud bot
f1dc8c75db
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-15 00:23:31 +00:00
Stephan Orbaugh
ef099806a4
Merge pull request #50990 from AIlkiv/refactor/version-rollback-to-event
refactor: move version rollback hook to event
2025-02-27 15:03:37 +01:00
Nextcloud bot
7ef9ffa078
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-27 00:22:16 +00:00
Louis
9682ef7025
Merge pull request #50903 from nextcloud/artonge/fix/min_age_rentention_files_versions
fix(files_versions): Do not expire versions newer than min age
2025-02-25 16:01:05 +01:00
ailkiv
9b3424f607 refactor: move version rollback hook to event
Signed-off-by: ailkiv <a.ilkiv.ye@gmail.com>
2025-02-25 14:03:21 +00:00
Nextcloud bot
5d4be44748
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-24 20:39:08 +00:00