From 03ca26f0c438446bd3747c50893970171dfff8cd Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Thu, 30 May 2019 13:45:39 +0200 Subject: [PATCH] Change fallback logic --- mod/parse_url.php | 3 ++- mod/photos.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mod/parse_url.php b/mod/parse_url.php index f4fb2d06a0..7631a5a710 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -33,7 +33,8 @@ function parse_url_content(App $a) $url = trim($_GET['url']); // fallback in case no url is valid } else { - $a->internalRedirect(); + Logger::info('No url given'); + exit(); } if (!empty($_GET['title'])) { diff --git a/mod/photos.php b/mod/photos.php index 07693742c1..5dcb21a9d7 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -189,7 +189,7 @@ function photos_post(App $a) if ($a->argc > 3 && $a->argv[2] === 'album') { if (!Strings::isHex($a->argv[3])) { - $a->internalRedirect(); + $a->internalRedirect('photos/' . $a->data['user']['nickname'] . '/album'); } $album = hex2bin($a->argv[3]); @@ -1032,7 +1032,7 @@ function photos_content(App $a) if ($datatype === 'album') { // if $datum is not a valid hex, redirect to the default page if (!Strings::isHex($datum)) { - $a->internalRedirect(); + $a->internalRedirect('photos/' . $a->data['user']['nickname']. '/album'); } $album = hex2bin($datum); -- 2.39.5