[Jaws-commits] r13384 - in trunk/jaws/html: gadgets/Users gadgets/Users/resources include/Jaws

afz at jaws-project.com afz at jaws-project.com
Sat Aug 11 20:11:56 UTC 2012


Author: afz
Date: 2012-08-11 20:11:55 +0000 (Sat, 11 Aug 2012)
New Revision: 13384

Modified:
   trunk/jaws/html/gadgets/Users/AdminAjax.php
   trunk/jaws/html/gadgets/Users/resources/script.js
   trunk/jaws/html/include/Jaws/User.php
Log:
Another patch for avatar stuff

Modified: trunk/jaws/html/gadgets/Users/AdminAjax.php
===================================================================
--- trunk/jaws/html/gadgets/Users/AdminAjax.php	2012-08-11 20:10:49 UTC (rev 13383)
+++ trunk/jaws/html/gadgets/Users/AdminAjax.php	2012-08-11 20:11:55 UTC (rev 13384)
@@ -57,7 +57,7 @@
             if (empty($profile['avatar'])) {
                 $profile['avatar'] = $GLOBALS['app']->getSiteURL('/gadgets/Users/images/avatar.png');
             } else {
-                $profile['avatar'] = $GLOBALS['app']->getDataURL('avatar/'. $profile['avatar']);
+                $profile['avatar'] = $GLOBALS['app']->getDataURL(). 'avatar/'. $profile['avatar'];
             }
 
             if (!empty($profile['dob'])) {

Modified: trunk/jaws/html/gadgets/Users/resources/script.js
===================================================================
--- trunk/jaws/html/gadgets/Users/resources/script.js	2012-08-11 20:10:49 UTC (rev 13383)
+++ trunk/jaws/html/gadgets/Users/resources/script.js	2012-08-11 20:11:55 UTC (rev 13384)
@@ -416,7 +416,7 @@
         alert(response.message);
         $('frm_avatar').reset();
     } else {
-        var filename = encodeURIComponent(response.message) + '&' + (new Date()).getTime();
+        var filename = response.message + '&' + (new Date()).getTime();
         $('image').src = base_script + '?gadget=Users&action=LoadAvatar&file=' + filename;
         $('avatar').value = response.message;
     }

Modified: trunk/jaws/html/include/Jaws/User.php
===================================================================
--- trunk/jaws/html/include/Jaws/User.php	2012-08-11 20:10:49 UTC (rev 13383)
+++ trunk/jaws/html/include/Jaws/User.php	2012-08-11 20:11:55 UTC (rev 13384)
@@ -271,7 +271,7 @@
      */
     function GetAvatar($avatar, $email)
     {
-        $avatar = $GLOBALS['app']->getDataURL("avatar/$avatar");
+        $avatar = $GLOBALS['app']->getDataURL(). "avatar/$avatar";
         if (!file_exists($avatar)) {
             require_once JAWS_PATH . 'include/Jaws/Gravatar.php';
             $avatar = Jaws_Gravatar::GetGravatar($email);



More information about the Jaws-commits mailing list