From b6fa528b63528dc0467cf5001e95d4fa5b8e3d0b Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 1 Mar 2020 09:55:31 -0500 Subject: [PATCH 1/2] Remove duplicate photo album edit link --- view/templates/photo_album.tpl | 3 --- 1 file changed, 3 deletions(-) diff --git a/view/templates/photo_album.tpl b/view/templates/photo_album.tpl index 5080663abd..724a2abb39 100644 --- a/view/templates/photo_album.tpl +++ b/view/templates/photo_album.tpl @@ -1,8 +1,5 @@

{{$album}}

-{{if $edit}} - -{{/if}} {{if $edit}} {{/if}} From f814ca30d3062a07ccd19b67a8554626b645476f Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 1 Mar 2020 09:56:02 -0500 Subject: [PATCH 2/2] Use sensible URLs for return after album actions instead of $_SESSION['photo_return'] in mod/photos --- mod/photos.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/photos.php b/mod/photos.php index 0c94471c04..ef957ad5b0 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -204,13 +204,13 @@ function photos_post(App $a) if (!DBA::isResult($r)) { notice(DI::l10n()->t('Album not found.') . EOL); - DI::baseUrl()->redirect($_SESSION['photo_return']); + DI::baseUrl()->redirect('photos/' . $a->data['user']['nickname'] . '/album'); return; // NOTREACHED } // Check if the user has responded to a delete confirmation query if (!empty($_REQUEST['canceled'])) { - DI::baseUrl()->redirect($_SESSION['photo_return']); + DI::baseUrl()->redirect('photos/' . $a->data['user']['nickname'] . '/album/' . $a->argv[3]); } // RENAME photo album @@ -267,7 +267,7 @@ function photos_post(App $a) } } - DI::baseUrl()->redirect('photos/' . $a->argv[1]); + DI::baseUrl()->redirect('photos/' . $a->data['user']['nickname'] . '/album'); } if ($a->argc > 3 && $a->argv[2] === 'image') {