Commit graph

1676 commits

Author SHA1 Message Date
Ferdinand Thiessen
378ddda301
fix(files_versions): has-preview must be either true or false
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-08-07 01:24:07 +02:00
Nextcloud bot
4ce1980eff
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-08-02 00:12:22 +00:00
Nextcloud bot
b270a22c4a
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-30 00:12:11 +00:00
Borja Domínguez Vázquez
d0de83be10
feat(file-versions): #53151 add VersionCreatedEvent event
Signed-off-by: Borja Domínguez Vázquez <bdominguez@virtualwareco.com>
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-07-29 14:05:21 +02:00
Nextcloud bot
993355af9f
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-28 00:12:17 +00:00
Nextcloud bot
786bdb198e
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-26 00:12:15 +00:00
skjnldsv
3e7dc97cae feat: replace material icons with outline versions
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-07-24 10:55:43 +02:00
Nextcloud bot
e5572abb51
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-08 00:12:13 +00:00
Borja Domínguez Vázquez
cdeed5bcbe chore: get revision for a node
Signed-off-by: Borja Domínguez Vázquez <borja.dominguez@hotmail.com>
Signed-off-by: Borja Domínguez Vázquez <iam.n3uro@gmail.com>

wip

Signed-off-by: Borja Domínguez Vázquez <borja.dominguez@hotmail.com>
Signed-off-by: Borja Domínguez Vázquez <iam.n3uro@gmail.com>

wip

Signed-off-by: Borja Domínguez Vázquez <borja.dominguez@hotmail.com>
Signed-off-by: Borja Domínguez Vázquez <iam.n3uro@gmail.com>

Update IVersionBackend.php

Signed-off-by: Borja Domínguez Vázquez <iam.n3uro@gmail.com>

wip
2025-07-07 14:30:29 +02:00
Borja Domínguez Vázquez
676fb4014d chore: use constants for metadata
Signed-off-by: Borja Domínguez Vázquez <borja.dominguez@hotmail.com>
2025-07-05 22:38:08 +02:00
Arthur Schiwon
38a8546bd6
Merge pull request #52963 from nextcloud/fix/avoid-crashing-versions-listener-on-non-existing-file
fix(files_versions): Log error instead of crashing when event listeners get called on non-existing files
2025-07-03 15:21:25 +02:00
Arthur Schiwon
cbc573f787
Merge pull request #53276 from nextcloud/fix/log-failure-from-file-events
fix(files_versions): Log failure to compute node path
2025-07-03 09:45:37 +02:00
Robin Appelman
aa15f9d16d
chore: run rector
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-07-01 22:45:52 +02:00
Côme Chilliet
5c0e8df427 fix(files_versions): Log error instead of crashing when event listeners get called on non-existing files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-07-01 16:40:57 +02:00
Ferdinand Thiessen
5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +02:00
Nextcloud bot
0abd96d1a5
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-06-30 12:54:03 +00:00
Robin Appelman
981a65f080
fix: create new file with content when creating test files for versioning tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-06-23 19:07:36 +02:00
Nextcloud bot
f2ee6e2826
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-06-23 00:22:07 +00:00
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
Côme Chilliet
15c8b5ac58
chore: Use an if/else instead of the try/catch to make meaning more obvious
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-06-17 16:25:45 +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
Côme Chilliet
7f1fb65549
fix(files_versions): Log failure to compute node path
To avoid hidden bugs, add some debug logging when a node path cannot be
 computed from a received event, to have more information for debugging

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-06-03 09:35:23 +02: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