[Jaws-commits] r12476 - branches/0.8/html/include/Jaws

afz at jaws-project.com afz at jaws-project.com
Mon Jan 23 07:51:08 UTC 2012


Author: afz
Date: 2012-01-23 07:51:08 +0000 (Mon, 23 Jan 2012)
New Revision: 12476

Modified:
   branches/0.8/html/include/Jaws/Gravatar.php
Log:
if email empty return default avatar

Modified: branches/0.8/html/include/Jaws/Gravatar.php
===================================================================
--- branches/0.8/html/include/Jaws/Gravatar.php	2012-01-23 04:33:50 UTC (rev 12475)
+++ branches/0.8/html/include/Jaws/Gravatar.php	2012-01-23 07:51:08 UTC (rev 12476)
@@ -10,7 +10,7 @@
  */
 class Jaws_Gravatar
 {
-    function GetGravatar($email, $size = 48)
+    function GetGravatar($email = '', $size = 48)
     {
         $theme = $GLOBALS['app']->GetTheme();
         if (file_exists($theme['path'] . 'default_avatar.png')) {
@@ -19,7 +19,7 @@
             $defaultImage = 'gadgets/Users/images/no-photo.png';
         }
 
-        if ($GLOBALS['app']->Registry->Get('/config/use_gravatar') == 'no') {
+        if (empty($email) || $GLOBALS['app']->Registry->Get('/config/use_gravatar') == 'no') {
             return $defaultImage;
         }
 



More information about the Jaws-commits mailing list