]> git.mxchange.org Git - friendica.git/blobdiff - mod/follow.php
Added "blocked" fields
[friendica.git] / mod / follow.php
index 4f0c3fc6fe4543ed66f40c2483ec93999df9df3f..b01395874f87969f02431412bdbbdbcdb9d0a039 100644 (file)
@@ -41,7 +41,9 @@ function follow_post(App $a)
                DI::baseUrl()->redirect('contact');
        }
 
-       follow_process($a);
+       $url = Probe::cleanURI($_REQUEST['url']);
+
+       follow_process($a, $url);
 }
 
 function follow_content(App $a)
@@ -68,10 +70,6 @@ function follow_content(App $a)
                DI::baseUrl()->redirect($return_path);
        }
 
-       if (!empty($_REQUEST['auto'])) {
-               follow_process($a);
-       }
-
        $submit = DI::l10n()->t('Submit Request');
 
        // Don't try to add a pending contact
@@ -123,6 +121,10 @@ function follow_content(App $a)
                $request = $contact['request'];
                $tpl = Renderer::getMarkupTemplate('dfrn_request.tpl');
        } else {
+               if (!empty($_REQUEST['auto'])) {
+                       follow_process($a, $contact['url']);
+               }
+       
                $request = DI::baseUrl() . '/follow';
                $tpl = Renderer::getMarkupTemplate('auto_request.tpl');
        }
@@ -175,9 +177,8 @@ function follow_content(App $a)
        return $o;
 }
 
-function follow_process(App $a)
+function follow_process(App $a, string $url)
 {
-       $url = Probe::cleanURI($_REQUEST['url']);
        $return_path = 'follow?url=' . urlencode($url);
 
        // Makes the connection request for friendica contacts easier