add nicknames to contact records (going forward and retroactive)

This commit is contained in:
Mike Macgirvin 2010-10-23 01:20:26 -07:00
parent d850badf2b
commit b8b227b328
7 changed files with 30 additions and 8 deletions

View file

@ -33,6 +33,11 @@ function scrape_dfrn($url) {
$x = $item->getAttribute('rel');
if(substr($x,0,5) == "dfrn-")
$ret[$x] = $item->getAttribute('href');
if($x === 'lrdd') {
$decoded = urldecode($item->getAttribute('href'));
if(preg_match('/acct:([^@]*)@/',$decoded,$matches))
$ret['nick'] = $matches[1];
}
}
// Pull out hCard profile elements