aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_versions/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | Really disable versions features when S3 versioning is enabledLouis Chemineau2023-04-171-1/+1
| | | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | Merge pull request #36690 from nextcloud/bugfix/noid/rollback-hookJulius Härtl2023-04-143-20/+27
|\ \ | |/ |/|
| * fix: Check return type on rollbackJulius Härtl2023-03-131-5/+8
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
| * don't re-get fileinfo for versioned file if it's not sharedRobin Appelman2023-03-131-13/+17
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * tests(files_versions): Tear down fs to clear mount cache before testingJulius Härtl2023-03-131-1/+1
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
| * fix: Make sure that rollback hook is triggered on all version backendsJulius Härtl2023-03-132-7/+7
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Fix return type of methods returning false on errorCôme Chilliet2023-04-031-1/+1
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Handle empty DB while expiring versionsLouis Chemineau2023-02-081-4/+10
| | | | | | | | Version on the FS can have no equivalent in the DB if they were created before the version naming feature. This makes sure that we catch the resulting exception and proceed as usual. Fix https://github.com/nextcloud/server/issues/36541 Signed-off-by: Louis Chemineau <louis@chmn.me>
* Document that size may be a float in new class VersionEntityCôme Chilliet2023-02-074-9/+13
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix versions restoring with S3Louis Chemineau2023-01-261-5/+24
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Use node's owner if no user is connectedLouis Chemineau2023-01-261-15/+25
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Prevent storing versions with the same mtimeLouis Chemineau2023-01-261-2/+3
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Fix renaming files_versionsLouis Chemineau2023-01-261-7/+6
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Handle empty files in version creation logicLouis Chemineau2023-01-265-29/+131
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Fix hookconnector testsLouis Chemineau2023-01-261-30/+5
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Adapt files_versions tests to modernized hooksLouis Chemineau2023-01-261-8/+45
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* User rootFolder instead of userFolder in FileEventsListenerLouis Chemineau2023-01-261-13/+26
| | | | | | Requesting userFolder fails during NC installation phase. Signed-off-by: Louis Chemineau <louis@chmn.me>
* Rename Hooks.php to FileEventsListener.phpLouis Chemineau2023-01-262-11/+12
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Prevent expiration of named versionsLouis Chemineau2023-01-261-1/+22
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Delete file versions entries in DB when node is deletedLouis Chemineau2023-01-262-0/+10
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Allow to delete a version through DAVLouis Chemineau2023-01-266-4/+72
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Support getting and patching version-labelLouis Chemineau2023-01-2611-35/+294
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Create files_versions tableLouis Chemineau2023-01-263-0/+220
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Modernise hook listener of files_versionsLouis Chemineau2023-01-262-55/+88
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Handle badly named version files more gracefully and log informationCôme Chilliet2022-10-111-5/+13
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* use filesystem user instead of file owner for creating versionRobin Appelman2022-09-091-1/+10
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* always use the default fs owner when storing versionsRobin Appelman2022-09-061-14/+27
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Port existing server code to new interfaceCarl Schwan2022-08-081-17/+9
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Expose additional emails in {DAV:}alternate-URI-setThomas Citharel2022-05-171-0/+2
| | | | | | | | | This allows iMip invitations to be send with an alternative email as "Reply-To" field. Closes #27201 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* cache internalpath in versions cleanupRobin Appelman2022-04-041-2/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add configuration flag to disable the background job for files_versionsDaniel Kesselberg2021-10-111-3/+13
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Merge pull request #27408 from PhrozenByte/enhancement/FilesVersionsCleanUpPathVincent Petry2021-10-081-5/+28
|\ | | | | Add occ versions:cleanup --path option
| * Improve occ versions:cleanup --path optionDaniel Rudolf2021-10-071-2/+2
| | | | | | | | Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
| * Add occ versions:cleanup --path optionDaniel Rudolf2021-06-071-5/+28
| | | | | | | | Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
* | Merge pull request #28458 from nextcloud/expose-user-language-davRichard Steinmetz2021-08-201-1/+3
|\ \ | | | | | | Expose user language through DAV
| * | Expose user language through DAVThomas Citharel2021-08-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces the '{http://nextcloud.com/ns}language' prop that gives the user's language Closes #28449 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* | | use search to find versions to expireRobin Appelman2021-08-181-18/+43
|/ / | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Improve auto expiration hintszaimen2021-08-081-1/+1
| | | | | | | | | | Signed-off-by: szaimen <szaimen@e.mail.de> Co-Authored-By: Pytal <24800714+Pytal@users.noreply.github.com>
* | Remove allmost all deprecation from the files_version appCarl Schwan2021-07-2311-77/+96
|/ | | | | | | | | | The remaining deprecations are related to Utils::hooks and I will take a look at how EventDispatcher works before working on them. Aside from the deprecations, this patch also does a few minor improvements around type hinting. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-0427-60/+23
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Drop \OCP\UserChristoph Wurst2021-05-212-5/+5
| | | | | | Inlines and remaining usages and drops the deprecated public API. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Restrict autocompletion also based on the phonebook known usersJoas Schilling2021-03-101-0/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Bump nextcloud/coding-standard from 0.3.0 to 0.5.0dependabot-preview[bot]2021-02-183-14/+14
| | | | | | | | | | Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* dont stop expiring versions if we cant check if the source file still existsRobin Appelman2021-02-051-2/+9
| | | | | | instead continue assuming it still exists Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-162-2/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Catch storage not available in versions expire commandChristoph Wurst2020-11-251-1/+17
| | | | | | | | | | | | External storage with session credentials is not accessible without a user session, hence background jobs and CLI commands can't work with them. The previously unhandled exception causes logged errors in the nextcloud log. This patch catches the specific exception and logs it as warnings. So for a production instance the error won't spam their logs for this non-recoverable and technically unsolvable error if the minimum log level is set to the default of 3 (error). Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Return all keys in getAllVersions() insteadMorris Jobke2020-10-121-4/+7
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix undefined index and consequential damages in versions codeChristoph Wurst2020-10-121-1/+1
| | | | | | | | | | If the user has no space and there are no versions, there won't be an `all` index in the versions entry. Hence this triggers a warning and becomes `null`, afterwards `count`, `foreach` and friends will happily throw even more warnings and errors because they don't want to play with `null`. Thus adding a fallback to an empty array. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-052-8/+8
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-243-1/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>