Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable28] Synchronize operation on live photo files #41921

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

backportbot-nextcloud[bot]
Copy link

@backportbot-nextcloud backportbot-nextcloud bot commented Nov 30, 2023

Backport of #41765 and #41924

Signed-off-by: Louis Chemineau <louis@chmn.me>
@backportbot-nextcloud backportbot-nextcloud bot added feature: files pending documentation This pull request needs an associated documentation update php Pull requests that update Php code labels Nov 30, 2023
@backportbot-nextcloud backportbot-nextcloud bot added this to the Nextcloud 28 milestone Nov 30, 2023
$this->handleDeletion($event, $peerFile);
} elseif ($event instanceof CacheEntryRemovedEvent) {
$peerFile->delete();
} elseif ($event instanceof BeforeNodeRestoredEvent) {

Check failure

Code scanning / Psalm

RedundantCondition

Type OCA\Files_Trashbin\Events\BeforeNodeRestoredEvent for $event is always OCA\Files_Trashbin\Events\BeforeNodeRestoredEvent
}

if ($event instanceof BeforeNodeRenamedEvent) {
$this->handleMove($event, $peerFile);

Check notice

Code scanning / Psalm

ArgumentTypeCoercion

Argument 2 of OCA\Files\Listener\SyncLivePhotosListener::handleMove expects OCP\Files\File, but parent type OCP\Files\Node provided
if ($event instanceof BeforeNodeRenamedEvent) {
$this->handleMove($event, $peerFile);
} elseif ($event instanceof BeforeNodeDeletedEvent) {
$this->handleDeletion($event, $peerFile);

Check notice

Code scanning / Psalm

ArgumentTypeCoercion

Argument 2 of OCA\Files\Listener\SyncLivePhotosListener::handleDeletion expects OCP\Files\File, but parent type OCP\Files\Node provided
} elseif ($event instanceof CacheEntryRemovedEvent) {
$peerFile->delete();
} elseif ($event instanceof BeforeNodeRestoredEvent) {
$this->handleRestore($event, $peerFile);

Check notice

Code scanning / Psalm

ArgumentTypeCoercion

Argument 2 of OCA\Files\Listener\SyncLivePhotosListener::handleRestore expects OCP\Files\File, but parent type OCP\Files\Node provided
$event->abortOperation(new NotPermittedException("Cannot restore the video part of a live photo"));
}
} else {
$user = $this->userSession->getUser();

Check notice

Code scanning / Psalm

PossiblyNullReference

Cannot call method getUser on possibly null value
@AndyScherzinger AndyScherzinger mentioned this pull request Nov 30, 2023
3 tasks
@artonge
Copy link
Contributor

artonge commented Nov 30, 2023

CI failure unrelated

@artonge artonge merged commit 996d94a into stable28 Nov 30, 2023
89 of 97 checks passed
@artonge artonge deleted the backport/41765/stable28 branch November 30, 2023 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: files pending documentation This pull request needs an associated documentation update php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants