Skip to content

Commit

Permalink
UPD code
Browse files Browse the repository at this point in the history
  • Loading branch information
tretdm committed Oct 19, 2023
1 parent e3311fb commit fef0203
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 313 deletions.
5 changes: 1 addition & 4 deletions Web/Presenters/PhotosPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,7 @@ function renderDeletePhoto(int $ownerId, int $photoId): void
if(is_null($this->user) || $this->user->id != $ownerId)
$this->flashFail("err", tr("error_access_denied_short"), tr("error_access_denied"));

if(!is_null($album = $photo->getAlbum()))
$redirect = $album->getOwner() instanceof User ? "/id0" : "/club" . $ownerId;
else
$redirect = "/id0";
$redirect = $photo->getAlbum()->getOwner() instanceof User ? "/id0" : "/club" . $ownerId;

$photo->isolate();
$photo->delete();
Expand Down
Loading

0 comments on commit fef0203

Please sign in to comment.