diff options
author | friendica <info@friendica.com> | 2012-02-26 15:07:34 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-02-26 15:07:34 -0800 |
commit | 89560edde2fe3fb198b558479e9c2300fc4185fd (patch) | |
tree | bffb4a563ed2fe1ff02a4221e28c608460c866db /include/Scrape.php | |
parent | 6ddd444afde33337235eab3aa9d6d1fe12bcb7a4 (diff) | |
parent | fe3dfbee5638dd2988bd8b126652b3138572f02c (diff) | |
download | volse-hubzilla-89560edde2fe3fb198b558479e9c2300fc4185fd.tar.gz volse-hubzilla-89560edde2fe3fb198b558479e9c2300fc4185fd.tar.bz2 volse-hubzilla-89560edde2fe3fb198b558479e9c2300fc4185fd.zip |
Merge pull request #50 from annando/master
massive changes in mail and design updates in "vier"
Diffstat (limited to 'include/Scrape.php')
-rwxr-xr-x | include/Scrape.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/include/Scrape.php b/include/Scrape.php index 1835892eb..4c4ad3cdb 100755 --- a/include/Scrape.php +++ b/include/Scrape.php @@ -452,10 +452,19 @@ function probe_url($url, $mode = PROBE_NORMAL) { $adr = imap_rfc822_parse_adrlist($x->to,''); if(isset($adr)) { foreach($adr as $feadr) { - if((strcasecmp($feadr->mailbox,$name) == 0) - &&(strcasecmp($feadr->host,$phost) == 0) + if((strcasecmp($feadr->mailbox,$name) == 0) + &&(strcasecmp($feadr->host,$phost) == 0) && (strlen($feadr->personal))) { - $vcard['fn'] = notags($feadr->personal); + + $personal = imap_mime_header_decode($feadr->personal); + $vcard['fn'] = ""; + foreach($personal as $perspart) + if ($perspart->charset != "default") + $vcard['fn'] .= iconv($perspart->charset, 'UTF-8//IGNORE', $perspart->text); + else + $vcard['fn'] .= $perspart->text; + + $vcard['fn'] = notags($vcard['fn']); } } } |