diff --git a/plugins/Gravatar/GravatarPlugin.php b/plugins/Gravatar/GravatarPlugin.php index 8a9721ea90..208262d0e9 100644 --- a/plugins/Gravatar/GravatarPlugin.php +++ b/plugins/Gravatar/GravatarPlugin.php @@ -34,17 +34,17 @@ class GravatarPlugin extends Plugin { return true; } - + function onStartAvatarFormData($action) { $user = common_current_user(); $hasGravatar = $this->hasGravatar($user->id); - + if($hasGravatar) { return false; } } - + function onEndAvatarFormData($action) { $user = common_current_user(); @@ -91,7 +91,7 @@ class GravatarPlugin extends Plugin _m('To use a Gravatar first enter in an email address.')); } } - + function onStartAvatarSaveForm($action) { if ($action->arg('add')) { @@ -131,19 +131,19 @@ class GravatarPlugin extends Plugin } return false; } - + function gravatar_save() { $cur = common_current_user(); - + if(empty($cur->email)) { return array('message' => _m('You do not have a email set in your profile.'), 'success' => false); } //Get rid of previous Avatar $this->gravatar_remove(); - + foreach (array(AVATAR_PROFILE_SIZE, AVATAR_STREAM_SIZE, AVATAR_MINI_SIZE) as $size) { $gravatar = new Avatar(); $gravatar->profile_id = $cur->id; @@ -181,7 +181,7 @@ class GravatarPlugin extends Plugin return array('message' => _m('Gravatar removed.'), 'success' => true); } - + function gravatar_url($email, $size) { $url = "http://www.gravatar.com/avatar.php?gravatar_id=". @@ -202,4 +202,4 @@ class GravatarPlugin extends Plugin return true; } -} \ No newline at end of file +} diff --git a/plugins/Gravatar/README b/plugins/Gravatar/README index 9337e24a0a..2639048089 100644 --- a/plugins/Gravatar/README +++ b/plugins/Gravatar/README @@ -10,4 +10,4 @@ addPlugin('Gravatar', array()); ToDo: Site default all on for gravatar by default Migration Script -Localize \ No newline at end of file +Localize