[stable26] fix: Make sure that rollback hook is triggered on all version backends#37743
Merged
juliusknorr merged 4 commits intostable26from Apr 24, 2023
Merged
[stable26] fix: Make sure that rollback hook is triggered on all version backends#37743juliusknorr merged 4 commits intostable26from
juliusknorr merged 4 commits intostable26from
Conversation
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
| $userFolder = $this->rootFolder->getUserFolder($user->getUID()); | ||
| $nodes = $userFolder->getById($file->getId()); | ||
| $file2 = array_pop($nodes); | ||
| $userFolder = $this->rootFolder->getUserFolder($user->getUID()); |
Check notice
Code scanning / Psalm
PossiblyNullReference
| $versionEntity->setTimestamp($file2->getMTime()); | ||
| $versionEntity->setSize($file2->getSize()); | ||
| $versionEntity->setMimetype($this->mimeTypeLoader->getId($file2->getMimetype())); | ||
| $versionEntity->setFileId($file->getId()); |
Check notice
Code scanning / Psalm
PossiblyNullArgument
|
|
||
| // Insert entries in the DB for existing versions. | ||
| $versionsOnFS = Storage::getVersions($user->getUID(), $userFolder->getRelativePath($file2->getPath())); | ||
| $versionsOnFS = Storage::getVersions($user->getUID(), $userFolder->getRelativePath($file->getPath())); |
Check notice
Code scanning / Psalm
PossiblyUndefinedVariable
| foreach ($versionsOnFS as $version) { | ||
| $versionEntity = new VersionEntity(); | ||
| $versionEntity->setFileId($file2->getId()); | ||
| $versionEntity->setFileId($file->getId()); |
Check notice
Code scanning / Psalm
PossiblyNullArgument
| $nodes = $userFolder->getById($file->getId()); | ||
| $file2 = array_pop($nodes); | ||
| $userFolder = $this->rootFolder->getUserFolder($user->getUID()); | ||
| $nodes = $userFolder->getById($file->getId()); |
Check notice
Code scanning / Psalm
PossiblyNullArgument
icewind1991
approved these changes
Apr 19, 2023
max-nextcloud
approved these changes
Apr 20, 2023
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backport of #36690