]> git.mxchange.org Git - friendica.git/commitdiff
Change fallback logic
authorPhilipp Holzer <admin+github@philipp.info>
Thu, 30 May 2019 11:45:39 +0000 (13:45 +0200)
committerPhilipp Holzer <admin+github@philipp.info>
Thu, 30 May 2019 11:45:39 +0000 (13:45 +0200)
mod/parse_url.php
mod/photos.php

index f4fb2d06a0d476962b3185e2ad7d45820bb005fc..7631a5a710b62d07d0f349b2b3b17914debb81a6 100644 (file)
@@ -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'])) {
index 07693742c184c59f90915fca0d71e987fa244a27..5dcb21a9d720b87afbc51179225cd04cc3252b8f 100644 (file)
@@ -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);