Merge pull request #2854 from annando/1610-webfinger-bugfix
webfinger_dfrn now work as expected
This commit is contained in:
commit
9572e12970
|
@ -118,18 +118,16 @@ class Probe {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static function webfinger_dfrn($webbie, &$hcard) {
|
public static function webfinger_dfrn($webbie, &$hcard) {
|
||||||
if (!strstr($webbie, '@'))
|
|
||||||
return $webbie;
|
|
||||||
|
|
||||||
$profile_link = '';
|
$profile_link = '';
|
||||||
|
|
||||||
$links = self::webfinger($webbie);
|
$links = self::lrdd($webbie);
|
||||||
logger('webfinger_dfrn: '.$webbie.':'.print_r($links,true), LOGGER_DATA);
|
logger('webfinger_dfrn: '.$webbie.':'.print_r($links,true), LOGGER_DATA);
|
||||||
if (count($links)) {
|
if (count($links)) {
|
||||||
foreach ($links as $link) {
|
foreach ($links as $link) {
|
||||||
if ($link['@attributes']['rel'] === NAMESPACE_DFRN)
|
if ($link['@attributes']['rel'] === NAMESPACE_DFRN)
|
||||||
$profile_link = $link['@attributes']['href'];
|
$profile_link = $link['@attributes']['href'];
|
||||||
if ($link['@attributes']['rel'] === NAMESPACE_OSTATUSSUB)
|
if (($link['@attributes']['rel'] === NAMESPACE_OSTATUSSUB) AND ($profile_link == ""))
|
||||||
$profile_link = 'stat:'.$link['@attributes']['template'];
|
$profile_link = 'stat:'.$link['@attributes']['template'];
|
||||||
if ($link['@attributes']['rel'] === 'http://microformats.org/profile/hcard')
|
if ($link['@attributes']['rel'] === 'http://microformats.org/profile/hcard')
|
||||||
$hcard = $link['@attributes']['href'];
|
$hcard = $link['@attributes']['href'];
|
||||||
|
|
Loading…
Reference in a new issue