]> git.mxchange.org Git - friendica.git/blobdiff - mod/redir.php
Merge pull request #3423 from Hypolite/improvement/move-app-to-src-2
[friendica.git] / mod / redir.php
index 32a235de4bc6b1a1abbbf309f082a6b1967a520b..366c398867682def7fe2dd0a3694eee81eedd539 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use Friendica\App;
+
 function redir_init(App $a) {
 
        $url = ((x($_GET,'url')) ? $_GET['url'] : '');
@@ -8,9 +10,9 @@ function redir_init(App $a) {
 
        // traditional DFRN
 
-       if ( $con_url || (local_user() && $a->argc > 1 && intval($a->argv[1])) ) {
+       if( $con_url || (local_user() && $a->argc > 1 && intval($a->argv[1])) ) {
 
-               if ($con_url) {
+               if($con_url) {
                        $con_url = str_replace('https', 'http', $con_url);
 
                        $r = q("SELECT * FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d LIMIT 1",
@@ -18,7 +20,7 @@ function redir_init(App $a) {
                                intval(local_user())
                        );
 
-                       if ((! dbm::is_result($r)) || ($r[0]['network'] !== NETWORK_DFRN))
+                       if((! dbm::is_result($r)) || ($r[0]['network'] !== NETWORK_DFRN))
                                goaway(z_root());
 
                        $cid = $r[0]['id'];
@@ -31,17 +33,17 @@ function redir_init(App $a) {
                                intval(local_user())
                        );
 
-                       if ((! dbm::is_result($r)) || ($r[0]['network'] !== NETWORK_DFRN))
+                       if((! dbm::is_result($r)) || ($r[0]['network'] !== NETWORK_DFRN))
                                goaway(z_root());
                }
 
                $dfrn_id = $orig_id = (($r[0]['issued-id']) ? $r[0]['issued-id'] : $r[0]['dfrn-id']);
 
-               if ($r[0]['duplex'] && $r[0]['issued-id']) {
+               if($r[0]['duplex'] && $r[0]['issued-id']) {
                        $orig_id = $r[0]['issued-id'];
                        $dfrn_id = '1:' . $orig_id;
                }
-               if ($r[0]['duplex'] && $r[0]['dfrn-id']) {
+               if($r[0]['duplex'] && $r[0]['dfrn-id']) {
                        $orig_id = $r[0]['dfrn-id'];
                        $dfrn_id = '0:' . $orig_id;
                }