[xoops-cvslog 5751] CVS update: xoops2jp/html/modules/user/forms

Back to archive index

Minahito minah****@users*****
2006年 11月 10日 (金) 15:19:31 JST


Index: xoops2jp/html/modules/user/forms/AvatarSelectForm.class.php
diff -u xoops2jp/html/modules/user/forms/AvatarSelectForm.class.php:1.1.2.3.2.2 xoops2jp/html/modules/user/forms/AvatarSelectForm.class.php:1.1.2.3.2.3
--- xoops2jp/html/modules/user/forms/AvatarSelectForm.class.php:1.1.2.3.2.2	Fri Sep 29 17:14:45 2006
+++ xoops2jp/html/modules/user/forms/AvatarSelectForm.class.php	Fri Nov 10 15:19:30 2006
@@ -1,7 +1,7 @@
 <?php
 /**
  * @package user
- * @version $Id: AvatarSelectForm.class.php,v 1.1.2.3.2.2 2006/09/29 08:14:45 minahito Exp $
+ * @version $Id: AvatarSelectForm.class.php,v 1.1.2.3.2.3 2006/11/10 06:19:30 minahito Exp $
  */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
@@ -35,6 +35,10 @@
 			$this->mSelectedId = $avatar_id;
 		}
 		
+		if ($this->mSelectedId == 0) {
+			return;
+		}
+		
 		//
 		// Check whether specified avatar_id exists. 
 		//
@@ -54,9 +58,14 @@
 	function update(&$obj)
 	{
 		$handler =& xoops_getmodulehandler('avatar');
-		$avatar =& $handler->get($this->mSelectedId);
 		
-		$obj->set('user_avatar', $avatar->get('avatar_file'));
+		if ($this->mSelectedId == 0) {
+			$obj->set('user_avatar', 'blank.gif');
+		}
+		else {
+			$avatar =& $handler->get($this->mSelectedId);
+			$obj->set('user_avatar', $avatar->get('avatar_file'));
+		}
 	}
 }
 


xoops-cvslog メーリングリストの案内
Back to archive index