]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Gravatar/GravatarPlugin.php
Merge branch 'master' into 0.9.x
[quix0rs-gnu-social.git] / plugins / Gravatar / GravatarPlugin.php
index 8a9721ea90daa6b89e7eb9a4006470bcdf68f58d..dd8ff7217615e8138ee55a5623fa04126de75868 100644 (file)
@@ -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,18 @@ 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.'),
+            return array('message' => _m('You do not have an email address 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;
@@ -156,7 +155,7 @@ class GravatarPlugin extends Plugin
             $gravatar->created = DB_DataObject_Cast::dateTime(); # current time
 
             if (!$gravatar->insert()) {
-                return array('message' => _m('Failed to save Gravatar to the DB.'),
+                return array('message' => _m('Failed to save Gravatar to the database.'),
                              'success' => false);
             }
         }
@@ -181,7 +180,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 +201,4 @@ class GravatarPlugin extends Plugin
 
         return true;
     }
-}
\ No newline at end of file
+}