]> git.mxchange.org Git - friendica.git/blobdiff - mod/follow.php
Merge pull request #8073 from annando/issue-8067
[friendica.git] / mod / follow.php
index 31b92aa0dc06eb6873de05af9f3a647febc5901e..7363275de69966e7b352bf8e5d4dd1dd108d366f 100644 (file)
@@ -8,6 +8,7 @@ use Friendica\Core\L10n;
 use Friendica\Core\Protocol;
 use Friendica\Core\Renderer;
 use Friendica\Core\System;
+use Friendica\DI;
 use Friendica\Model\Contact;
 use Friendica\Model\Profile;
 use Friendica\Network\Probe;
@@ -21,7 +22,7 @@ function follow_post(App $a)
        }
 
        if (isset($_REQUEST['cancel'])) {
-               $a->internalRedirect('contact');
+               DI::baseUrl()->redirect('contact');
        }
 
        $uid = local_user();
@@ -38,14 +39,14 @@ function follow_post(App $a)
                if ($result['message']) {
                        notice($result['message']);
                }
-               $a->internalRedirect($return_path);
+               DI::baseUrl()->redirect($return_path);
        } elseif ($result['cid']) {
-               $a->internalRedirect('contact/' . $result['cid']);
+               DI::baseUrl()->redirect('contact/' . $result['cid']);
        }
 
        info(L10n::t('The contact could not be added.'));
 
-       $a->internalRedirect($return_path);
+       DI::baseUrl()->redirect($return_path);
        // NOTREACHED
 }
 
@@ -55,7 +56,7 @@ function follow_content(App $a)
 
        if (!local_user()) {
                notice(L10n::t('Permission denied.'));
-               $a->internalRedirect($return_path);
+               DI::baseUrl()->redirect($return_path);
                // NOTREACHED
        }
 
@@ -70,7 +71,7 @@ function follow_content(App $a)
        }
 
        if (!$url) {
-               $a->internalRedirect($return_path);
+               DI::baseUrl()->redirect($return_path);
        }
 
        $submit = L10n::t('Submit Request');
@@ -124,7 +125,7 @@ function follow_content(App $a)
                $request = $ret['request'];
                $tpl = Renderer::getMarkupTemplate('dfrn_request.tpl');
        } else {
-               $request = System::baseUrl() . '/follow';
+               $request = DI::baseUrl() . '/follow';
                $tpl = Renderer::getMarkupTemplate('auto_request.tpl');
        }
 
@@ -132,7 +133,7 @@ function follow_content(App $a)
 
        if (!$r) {
                notice(L10n::t('Permission denied.'));
-               $a->internalRedirect($return_path);
+               DI::baseUrl()->redirect($return_path);
                // NOTREACHED
        }
 
@@ -183,7 +184,7 @@ function follow_content(App $a)
                '$keywords_label'=> L10n::t('Tags:')
        ]);
 
-       $a->page['aside'] = '';
+       DI::page()['aside'] = '';
 
        $profiledata = Contact::getDetailsByURL($ret['url']);
        if ($profiledata) {