]> git.mxchange.org Git - friendica.git/commitdiff
Replace goaway location SESSION var return_url with page as string value
authorJonny Tischbein <jonny_tischbein@systemli.org>
Tue, 9 Oct 2018 18:10:34 +0000 (20:10 +0200)
committerJonny Tischbein <jonny_tischbein@systemli.org>
Tue, 9 Oct 2018 18:10:34 +0000 (20:10 +0200)
include/items.php
mod/events.php
mod/filerm.php
mod/ostatus_subscribe.php
mod/repair_ostatus.php

index 9fd557a77885838ee1cd7b415eacac99b67a75d0..8b666f1ca24337cd74b0647c56e21c86371acf6b 100644 (file)
@@ -354,7 +354,7 @@ function drop_item($id)
 
        if (!DBA::isResult($item)) {
                notice(L10n::t('Item not found.') . EOL);
-               goaway(System::baseUrl() . '/' . $_SESSION['return_url']);
+               goaway('/network');
        }
 
        if ($item['deleted']) {
@@ -401,17 +401,17 @@ function drop_item($id)
                }
                // Now check how the user responded to the confirmation query
                if (!empty($_REQUEST['canceled'])) {
-                       goaway(System::baseUrl() . '/' . $_SESSION['return_url']);
+                       goaway('/item/drop/' . $id);
                }
 
                // delete the item
                Item::deleteForUser(['id' => $item['id']], local_user());
 
-               goaway(System::baseUrl() . '/' . $_SESSION['return_url']);
+               goaway('/item/drop/' . $id);
                //NOTREACHED
        } else {
                notice(L10n::t('Permission denied.') . EOL);
-               goaway(System::baseUrl() . '/' . $_SESSION['return_url']);
+               goaway('/item/drop/' . $id);
                //NOTREACHED
        }
 }
index e5ebf8646531cf1e2688966a6e6171dea7928d1f..d6ad97eac67910c0671a3678853f04b80280742a 100644 (file)
@@ -187,7 +187,7 @@ function events_post(App $a)
                Worker::add(PRIORITY_HIGH, "Notifier", "event", $item_id);
        }
 
-       goaway($_SESSION['return_url']);
+       goaway('/events');
 }
 
 function events_content(App $a)
index bd46a8bfea2cc540eac71b44b24a9d0637654195..55b218e1519df0fd337321d21405ff9a3e21b28b 100644 (file)
@@ -25,9 +25,7 @@ function filerm_content(App $a) {
                file_tag_unsave_file(local_user(),$item_id,$term, $category);
        }
 
-       if (x($_SESSION,'return_url')) {
-               goaway(System::baseUrl() . '/' . $_SESSION['return_url']);
-       }
+       goaway('/network');
 
        killme();
 }
index 987f31699e588539727d545a6f113ba967399d29..ffaa6791f328bdf34f1d770d6929b4dc99aad486 100644 (file)
@@ -15,7 +15,7 @@ function ostatus_subscribe_content(App $a) {
 
        if (! local_user()) {
                notice(L10n::t('Permission denied.') . EOL);
-               goaway($_SESSION['return_url']);
+               goaway('/ostatus_subscribe');
                // NOTREACHED
        }
 
index 3acaa687a712942a959edbfaee62e5141a79cb91..4499220817449b83684020ca1da731e3a6d170e9 100644 (file)
@@ -14,7 +14,7 @@ function repair_ostatus_content(App $a) {
 
        if (! local_user()) {
                notice(L10n::t('Permission denied.') . EOL);
-               goaway($_SESSION['return_url']);
+               goaway('/ostatus_repair');
                // NOTREACHED
        }