]> git.mxchange.org Git - friendica.git/blobdiff - mod/hcard.php
Merge pull request #2739 from annando/1608-session-close
[friendica.git] / mod / hcard.php
index af49423de38c408adaaf1ef30edbaa5e29225fef..6d2d9e2ebfc38f03761ec6b0595787db981184f9 100644 (file)
@@ -1,6 +1,5 @@
 <?php
 
-if(! function_exists('hcard_init')) {
 function hcard_init(&$a) {
 
        $blocked = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false);
@@ -16,7 +15,7 @@ function hcard_init(&$a) {
        $profile = 0;
        if((local_user()) && ($a->argc > 2) && ($a->argv[2] === 'view')) {
                $which = $a->user['nickname'];
-               $profile = $a->argv[1];
+               $profile = $a->argv[1];         
        }
 
        profile_load($a,$which,$profile);
@@ -24,7 +23,7 @@ function hcard_init(&$a) {
        if((x($a->profile,'page-flags')) && ($a->profile['page-flags'] == PAGE_COMMUNITY)) {
                $a->page['htmlhead'] .= '<meta name="friendica.community" content="true" />';
        }
-       if(x($a->profile,'openidserver'))
+       if(x($a->profile,'openidserver'))                               
                $a->page['htmlhead'] .= '<link rel="openid.server" href="' . $a->profile['openidserver'] . '" />' . "\r\n";
        if(x($a->profile,'openid')) {
                $delegate = ((strstr($a->profile['openid'],'://')) ? $a->profile['openid'] : 'http://' . $a->profile['openid']);
@@ -43,9 +42,10 @@ function hcard_init(&$a) {
        $uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : ''));
        $a->page['htmlhead'] .= '<link rel="lrdd" type="application/xrd+xml" href="' . $a->get_baseurl() . '/xrd/?uri=' . $uri . '" />' . "\r\n";
        header('Link: <' . $a->get_baseurl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
-
+       
        $dfrn_pages = array('request', 'confirm', 'notify', 'poll');
        foreach($dfrn_pages as $dfrn)
                $a->page['htmlhead'] .= "<link rel=\"dfrn-{$dfrn}\" href=\"".$a->get_baseurl()."/dfrn_{$dfrn}/{$which}\" />\r\n";
+
 }
-}
+