X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Ffollow.php;h=689ae823291410d09840a8f1b8c8c9d2cc4953c5;hb=8c245a5d2f4e6882211ac17561f86537a7089c73;hp=763ffb1b01c456e436057d9cfe72f94324273974;hpb=527e050ecc1037973595fd5de12682cfa9e19d64;p=friendica.git diff --git a/mod/follow.php b/mod/follow.php index 763ffb1b01..689ae82329 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -84,7 +84,7 @@ function follow_post(&$a) { // Google doesn't use absolute url in profile photos if((x($vcard,'photo')) && substr($vcard['photo'],0,1) == '/') { - $h = parse_url($hcard); + $h = @parse_url($hcard); if($h) $vcard['photo'] = $h['scheme'] . '://' . $h['host'] . $vcard['photo']; } @@ -117,6 +117,10 @@ function follow_post(&$a) { $author = $feed->get_author(); if($author) { $vcard['fn'] = unxmlify(trim($author->get_name())); + if(! $vcard['fn']) + $vcard['fn'] = trim(unxmlify($author->get_email())); + if(strpos($vcard['fn'],'@') !== false) + $vcard['fn'] = substr($vcard['fn'],0,strpos($vcard['fn'],'@')); $vcard['nick'] = strtolower(notags(unxmlify($vcard['fn']))); if(strpos($vcard['nick'],' ')) $vcard['nick'] = trim(substr($vcard['nick'],0,strpos($vcard['nick'],' '))); @@ -249,9 +253,7 @@ function follow_post(&$a) { // pull feed and consume it, which should subscribe to the hub. - $php_path = ((x($a->config,'php_path') && strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php'); - //proc_close(proc_open("\"$php_path\" \"include/poller.php\" \"$contact_id\" &", array(), $foo)); - proc_run($php_path,"include/poller.php","$contact_id"); + proc_run('php',"include/poller.php","$contact_id"); // create a follow slap