]> git.mxchange.org Git - friendica.git/blobdiff - mod/xrd.php
applied coding convention:
[friendica.git] / mod / xrd.php
index 290c524a7d7aac3446159346b22989f54c068084..7b812a7f9d94610d804515ba2e454cdf855762b0 100644 (file)
@@ -2,7 +2,7 @@
 
 require_once('include/crypto.php');
 
-function xrd_init(&$a) {
+function xrd_init(App $a) {
 
        $uri = urldecode(notags(trim($_GET['uri'])));
 
@@ -41,13 +41,15 @@ function xrd_init(&$a) {
 
        $profile_url = App::get_baseurl().'/profile/'.$r[0]['nickname'];
 
-       if ($acct)
+       if ($acct) {
                $alias = $profile_url;
+       }
        else {
                $alias = 'acct:'.$r[0]['nickname'].'@'.$a->get_hostname();
 
-               if ($a->get_path())
+               if ($a->get_path()) {
                        $alias .= '/'.$a->get_path();
+               }
        }
 
        $o = replace_macros($tpl, array(
@@ -65,7 +67,7 @@ function xrd_init(&$a) {
                '$salmen'      => App::get_baseurl() . '/salmon/'        . $r[0]['nickname'] . '/mention',
                '$subscribe'   => App::get_baseurl() . '/follow?url={uri}',
                '$modexp'      => 'data:application/magic-public-key,'  . $salmon_key,
-               '$bigkey'      =>  salmon_key($r[0]['pubkey'])
+               '$bigkey'      => salmon_key($r[0]['pubkey']),
        ));