]> git.mxchange.org Git - friendica.git/commitdiff
Use sensible URLs for return after album actions instead of $_SESSION['photo_return...
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 1 Mar 2020 14:56:02 +0000 (09:56 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 1 Mar 2020 14:56:02 +0000 (09:56 -0500)
mod/photos.php

index 0c94471c0453ac1e8e436abb72fbee05be82c9dc..ef957ad5b05517110fd365b5d39a5ecb9e3ff9f4 100644 (file)
@@ -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') {