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

afz at jaws-project.com afz at jaws-project.com
Mon Aug 13 16:44:48 UTC 2012


Author: afz
Date: 2012-08-13 16:44:47 +0000 (Mon, 13 Aug 2012)
New Revision: 13419

Modified:
   branches/0.8/html/include/Jaws/User.php
Log:
display default avatar image if avatar not defined

Modified: branches/0.8/html/include/Jaws/User.php
===================================================================
--- branches/0.8/html/include/Jaws/User.php	2012-08-13 16:13:52 UTC (rev 13418)
+++ branches/0.8/html/include/Jaws/User.php	2012-08-13 16:44:47 UTC (rev 13419)
@@ -270,15 +270,15 @@
      */
     function GetAvatar($avatar, $email, $time = '')
     {
-        $avatar = $GLOBALS['app']->getDataURL(). "avatar/$avatar";
-        if (empty($avatar) || !file_exists($avatar)) {
+        $uAvatar = $GLOBALS['app']->getDataURL(). "avatar/$avatar";
+        if (empty($avatar) || !file_exists($uAvatar)) {
             require_once JAWS_PATH . 'include/Jaws/Gravatar.php';
-            $avatar = Jaws_Gravatar::GetGravatar($email);
+            $uAvatar = Jaws_Gravatar::GetGravatar($email);
         } else {
-            $avatar.= !empty($time)? "?$time" : '';
+            $uAvatar.= !empty($time)? "?$time" : '';
         }
 
-        return $avatar;
+        return $uAvatar;
     }
 
     /**



More information about the Jaws-commits mailing list