diff options
author | Friendika <info@friendika.com> | 2010-12-23 14:40:32 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2010-12-23 14:40:32 -0800 |
commit | c55cb45855ede35e593f6a1ed5e5878144cf0ad0 (patch) | |
tree | 6779dd94c7bd466330839f61658a9d31170db296 /mod/profile.php | |
parent | 68868fd74bbc6a6f2268b6c5467ccf9e025af011 (diff) | |
download | volse-hubzilla-c55cb45855ede35e593f6a1ed5e5878144cf0ad0.tar.gz volse-hubzilla-c55cb45855ede35e593f6a1ed5e5878144cf0ad0.tar.bz2 volse-hubzilla-c55cb45855ede35e593f6a1ed5e5878144cf0ad0.zip |
revised openid patch, added fix for Windows servers, make "is now friends with" commentable, fix settings form hook to be inside form
Diffstat (limited to 'mod/profile.php')
-rw-r--r-- | mod/profile.php | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/mod/profile.php b/mod/profile.php index a5f440f43..ffc412805 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -18,38 +18,19 @@ function profile_init(&$a) { profile_load($a,$which,$profile); - if (!get_config('system','no_openid') && $a->profile['openid']!=""){ - if (!isset($a->profile['openidserver'])){ - logger('friendika user table must be updated. `openidserver` field is missing'); - } else { - if ($a->profile['openidserver']==''){ - require_once('library/openid.php'); - $openid = new LightOpenID; - $openid->identity = $a->profile['openid']; - $a->profile['openidserver'] = $openid->discover($openid->identity); - - q("UPDATE `user` SET `openidserver` = '%s' WHERE `uid` = %d LIMIT 1", - dbesc($a->profile['openidserver']), - intval($a->profile['uid']) - ); - } - - - $a->page['htmlhead'] .= '<link rel="openid.server" href="'.$a->profile['openidserver'].'" />'. "\r\n"; - $a->page['htmlhead'] .= '<link rel="openid.delegate" href="'.$a->profile['openid'].'" />'. "\r\n"; - } - + 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']); + $a->page['htmlhead'] .= '<link rel="openid.delegate" href="' . $delegate . '" />' . "\r\n"; } - - $a->page['htmlhead'] .= '<meta name="dfrn-global-visibility" content="' . (($a->profile['net-publish']) ? 'true' : 'false') . '" />' . "\r\n" ; $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . $a->get_baseurl() . '/dfrn_poll/' . $which .'" />' . "\r\n" ; $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"; |