Merge pull request #8352 from MrPetovan/bug/8002-album-drop-cancel

Use sensible URLs for return after album actions instead of $_SESSION['photo_return'] in mod/photos
pull/8367/head
Philipp 2020-03-01 22:21:33 +01:00 zatwierdzone przez GitHub
commit 27b60b200e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 3 dodań i 6 usunięć

Wyświetl plik

@ -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') {

Wyświetl plik

@ -1,8 +1,5 @@
<h3 id="photo-album-title">{{$album}}</h3>
{{if $edit}}
<div id="album-edit-link"><a href="{{$edit.1}}" title="{{$edit.0}}">{{$edit.0}}</a></div>
{{/if}}
{{if $edit}}
<div id="album-edit-link"><a href="{{$edit.1}}" title="{{$edit.0}}">{{$edit.0}}</a></div>
{{/if}}