]> git.mxchange.org Git - friendica-addons.git/commitdiff
Split goaway to System::externalRedirectTo() and App->internalRedirect()
authorPhilipp Holzer <admin@philipp.info>
Fri, 19 Oct 2018 18:14:52 +0000 (20:14 +0200)
committerPhilipp Holzer <admin@philipp.info>
Mon, 4 Feb 2019 00:50:39 +0000 (01:50 +0100)
blackout/blackout.php
notifyall/notifyall.php
startpage/startpage.php
statusnet/statusnet.php
twitter/twitter.php

index 9fba4cd1a5bfa44a0462009e5f3e1ebf124c1801..a4e3eb35996058f66223e8124f5448e42c48b80d 100644 (file)
@@ -88,7 +88,7 @@ function blackout_redirect ($a, $b) {
     }
     if (( $date1 <= $now ) && ( $now <= $date2 )) {
         logger('redirecting user to blackout page');
-        System::redirect($myurl);
+        System::externalRedirectTo($myurl);
     }
 }
 
index 9789ccd95fddcb739967349f151f75e18242a1d8..58e54908c87c887b5c9175887574ea12837aebfd 100644 (file)
@@ -96,7 +96,7 @@ function notifyall_post(App $a)
        }
 
        notice(L10n::t('Emails sent'));
-       System::redirect('admin');
+       $a->internalRedirect('admin');
 }
 
 function notifyall_content(&$a)
index 0b4653e1626d7fab4b16044722d0de870a6281ba..0971818f35d5faa47dc6d221b509e3bdfe5eb583 100644 (file)
@@ -32,7 +32,7 @@ function startpage_home_init($a, $b)
 
        $page = PConfig::get(local_user(), 'startpage', 'startpage');
        if (strlen($page)) {
-               System::redirect($page);
+               $a->internalRedirect($page);
        }
        return;
 }
index 274a6abd855fd642d669da2876eb5a94f103b690..aba503a42bf63880842eb3030af8f4a2d09c3049 100644 (file)
@@ -164,7 +164,7 @@ function statusnet_settings_post(App $a, $post)
                                        }
                                }
                        }
-                       System::redirect('settings/connectors');
+                       $a->internalRedirect('settings/connectors');
                } else {
                        if (isset($_POST['statusnet-consumersecret'])) {
                                //  check if we can reach the API of the GNU Social server
@@ -192,7 +192,7 @@ function statusnet_settings_post(App $a, $post)
                                                notice(L10n::t('We could not contact the GNU Social API with the Path you entered.') . EOL);
                                        }
                                }
-                               System::redirect('settings/connectors');
+                               $a->internalRedirect('settings/connectors');
                        } else {
                                if (isset($_POST['statusnet-pin'])) {
                                        //  if the user supplied us with a PIN from GNU Social, let the magic of OAuth happen
@@ -210,7 +210,7 @@ function statusnet_settings_post(App $a, $post)
                                        PConfig::set(local_user(), 'statusnet', 'post', 1);
                                        PConfig::set(local_user(), 'statusnet', 'post_taglinks', 1);
                                        //  reload the Addon Settings page, if we don't do it see Bug #42
-                                       System::redirect('settings/connectors');
+                                       $a->internalRedirect('settings/connectors');
                                } else {
                                        //  if no PIN is supplied in the POST variables, the user has changed the setting
                                        //  to post a dent for every new __public__ posting to the wall
index 90cea144cfa1eec2f85ed4ce877a1734e3e4350f..b1eeb5b8638037cf4665d93b7456d75aa4a6911e 100644 (file)
@@ -261,7 +261,7 @@ function twitter_settings_post(App $a)
                                info($e->getMessage());
                        }
                        //  reload the Addon Settings page, if we don't do it see Bug #42
-                       System::redirect('settings/connectors');
+                       $a->internalRedirect('settings/connectors');
                } else {
                        //  if no PIN is supplied in the POST variables, the user has changed the setting
                        //  to post a tweet for every new __public__ posting to the wall