diff options
-rw-r--r-- | include/Scrape.php | 4 | ||||
-rw-r--r-- | include/network.php | 6 | ||||
-rw-r--r-- | mod/register.php | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/include/Scrape.php b/include/Scrape.php index 9c237916b..141c90dcf 100644 --- a/include/Scrape.php +++ b/include/Scrape.php @@ -446,7 +446,7 @@ function probe_url($url, $mode = PROBE_NORMAL) { $phost = substr($url,strpos($url,'@')+1); $profile = 'http://' . $phost; // fix nick character range - $vcard = array('fn' => $name, 'nick' => $name, 'photo' => gravatar_img($url)); + $vcard = array('fn' => $name, 'nick' => $name, 'photo' => avatar_img($url)); $notify = 'smtp ' . random_string(); $poll = 'email ' . random_string(); $priority = 0; @@ -655,7 +655,7 @@ function probe_url($url, $mode = PROBE_NORMAL) { } if((! $vcard['photo']) && strlen($email)) - $vcard['photo'] = gravatar_img($email); + $vcard['photo'] = avatar_img($email); if($poll === $profile) $lnk = $feed->get_permalink(); if(isset($lnk) && strlen($lnk)) diff --git a/include/network.php b/include/network.php index 38d0980d5..59705634b 100644 --- a/include/network.php +++ b/include/network.php @@ -692,13 +692,13 @@ function allowed_email($email) { }} -if(! function_exists('gravatar_img')) { -function gravatar_img($email) { +if(! function_exists('avatar_img')) { +function avatar_img($email) { $size = 175; $opt = 'identicon'; // psuedo-random geometric pattern if not found $rating = 'pg'; $hash = md5(trim(strtolower($email))); - + $url = 'http://www.gravatar.com/avatar/' . $hash . '.jpg' . '?s=' . $size . '&d=' . $opt . '&r=' . $rating; diff --git a/mod/register.php b/mod/register.php index 630c0a675..8812ebadb 100644 --- a/mod/register.php +++ b/mod/register.php @@ -324,7 +324,7 @@ function register_post(&$a) { require_once('include/Photo.php'); if(($use_gravatar) && (! strlen($photo))) - $photo = gravatar_img($email); + $photo = avatar_img($email); $photo_failure = false; $filename = basename($photo); @@ -333,7 +333,7 @@ function register_post(&$a) { if($img->is_valid()) { $img->scaleImageSquare(175); - + $hash = photo_new_resource(); $r = $img->store($newuid, 0, $hash, $filename, t('Profile Photos'), 4 ); |