X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2FScrape.php;h=9c237916bc30bfa4ab7b23440fd23a9f89576c9b;hb=533e215a9636888675fc89f92eb9d556db180f1e;hp=1835892eb022f7ed5ee77fcc2df8ada57c6fad10;hpb=bdb14d5aadce2f0a2f6dc9c898287ea424642dd8;p=friendica.git diff --git a/include/Scrape.php b/include/Scrape.php old mode 100755 new mode 100644 index 1835892eb0..9c237916bc --- a/include/Scrape.php +++ b/include/Scrape.php @@ -255,6 +255,11 @@ function scrape_feed($url) { } } } + // perhaps an RSS version 1 feed with a generic or incorrect content-type? + if(stristr($s,'')) { + $ret['feed_rss'] = $url; + return $ret; + } } try { @@ -452,10 +457,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']); } } } @@ -670,7 +684,7 @@ function probe_url($url, $mode = PROBE_NORMAL) { if(! x($vcard,'photo')) { $a = get_app(); - $vcard['photo'] = $a->get_baseurl() . '/images/default-profile.jpg' ; + $vcard['photo'] = $a->get_baseurl() . '/images/person-175.jpg' ; } if(! $profile)