]> git.mxchange.org Git - friendica.git/blobdiff - mod/photos.php
Renamed System::redirect() to $a->redirect()
[friendica.git] / mod / photos.php
index 55c8881e4cecd17d74d278fbc2e75dd8bb4d817d..3851e00bb6f712740109bcbb95607811b88cfda6 100644 (file)
@@ -196,7 +196,7 @@ function photos_post(App $a)
                $album = hex2bin($a->argv[3]);
 
                if ($album === L10n::t('Profile Photos') || $album === 'Contact Photos' || $album === L10n::t('Contact Photos')) {
-                       goaway($_SESSION['photo_return']);
+                       $a->redirect($_SESSION['photo_return']);
                        return; // NOTREACHED
                }
 
@@ -207,13 +207,13 @@ function photos_post(App $a)
 
                if (!DBA::isResult($r)) {
                        notice(L10n::t('Album not found.') . EOL);
-                       goaway($_SESSION['photo_return']);
+                       $a->redirect($_SESSION['photo_return']);
                        return; // NOTREACHED
                }
 
                // Check if the user has responded to a delete confirmation query
                if (!empty($_REQUEST['canceled'])) {
-                       goaway($_SESSION['photo_return']);
+                       $a->redirect($_SESSION['photo_return']);
                }
 
                // RENAME photo album
@@ -227,8 +227,7 @@ function photos_post(App $a)
                        // Update the photo albums cache
                        Photo::clearAlbumCache($page_owner_uid);
 
-                       $newurl = System::baseUrl() . '/photos/' . $a->user['nickname'] . '/album/' . bin2hex($newalbum);
-                       goaway($newurl);
+                       $a->redirect('photos/' . $a->user['nickname'] . '/album/' . bin2hex($newalbum));
                        return; // NOTREACHED
                }
 
@@ -281,7 +280,7 @@ function photos_post(App $a)
                                        $res[] = "'" . DBA::escape($rr['rid']) . "'" ;
                                }
                        } else {
-                               goaway($_SESSION['photo_return']);
+                               $a->redirect($_SESSION['photo_return']);
                                return; // NOTREACHED
                        }
 
@@ -299,14 +298,14 @@ function photos_post(App $a)
                        Photo::clearAlbumCache($page_owner_uid);
                }
 
-               goaway('photos/' . $a->data['user']['nickname']);
+               $a->redirect('photos/' . $a->data['user']['nickname']);
                return; // NOTREACHED
        }
 
 
        // Check if the user has responded to a delete confirmation query for a single photo
        if ($a->argc > 2 && !empty($_REQUEST['canceled'])) {
-               goaway($_SESSION['photo_return']);
+               $a->redirect($_SESSION['photo_return']);
        }
 
        if ($a->argc > 2 && defaults($_POST, 'delete', '') === L10n::t('Delete Photo')) {
@@ -356,7 +355,7 @@ function photos_post(App $a)
                        Photo::clearAlbumCache($page_owner_uid);
                }
 
-               goaway('photos/' . $a->data['user']['nickname']);
+               $a->redirect('photos/' . $a->data['user']['nickname']);
                return; // NOTREACHED
        }
 
@@ -697,7 +696,7 @@ function photos_post(App $a)
                                }
                        }
                }
-               goaway($_SESSION['photo_return']);
+               $a->redirect($_SESSION['photo_return']);
                return; // NOTREACHED
        }
 
@@ -928,7 +927,7 @@ function photos_post(App $a)
        // addon uploaders should call "killme()" [e.g. exit] within the photo_post_end hook
        // if they do not wish to be redirected
 
-       goaway($_SESSION['photo_return']);
+       $a->redirect($_SESSION['photo_return']);
        // NOTREACHED
 }