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

Back to archive index

Minahito minah****@users*****
2006年 10月 1日 (日) 18:55:54 JST


Index: xoops2jp/html/modules/user/forms/AvatarEditForm.class.php
diff -u xoops2jp/html/modules/user/forms/AvatarEditForm.class.php:1.1.2.5 xoops2jp/html/modules/user/forms/AvatarEditForm.class.php:1.1.2.6
--- xoops2jp/html/modules/user/forms/AvatarEditForm.class.php:1.1.2.5	Wed Jul 19 19:21:25 2006
+++ xoops2jp/html/modules/user/forms/AvatarEditForm.class.php	Sun Oct  1 18:55:54 2006
@@ -1,7 +1,7 @@
 <?php
 /**
  * @package user
- * @version $Id: AvatarEditForm.class.php,v 1.1.2.5 2006/07/19 10:21:25 minahito Exp $
+ * @version $Id: AvatarEditForm.class.php,v 1.1.2.6 2006/10/01 09:55:54 minahito Exp $
  */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
@@ -39,7 +39,7 @@
 		// Set field properties
 		//
 		$this->mFieldProperties['uploadavatar'] =& new XCube_FieldProperty($this);
-		$this->mFieldProperties['uploadavatar']->setDependsByArray(array('extension,maxfilesize'));
+		$this->mFieldProperties['uploadavatar']->setDependsByArray(array('extension', 'maxfilesize'));
 		$this->mFieldProperties['uploadavatar']->addMessage('extension', _MD_USER_ERROR_AVATAR_EXTENSION);
 		$this->mFieldProperties['uploadavatar']->addVar('extension', "jpg,gif,png");
 		$this->mFieldProperties['uploadavatar']->addMessage('maxfilesize', _MD_USER_ERROR_AVATAR_MAXFILESIZE);
@@ -71,12 +71,14 @@
 		
 		$this->mFormFile = $this->get('uploadavatar');
 
-		$this->mFormFile->setRandomToBodyName('cavt');
+		if ($this->mFormFile != null) {
+			$this->mFormFile->setRandomToBodyName('cavt');
 		
-		$filename = $this->mFormFile->getFileName();
-		$this->mFormFile->setBodyName(substr($filename, 0, 25));
+			$filename = $this->mFormFile->getFileName();
+			$this->mFormFile->setBodyName(substr($filename, 0, 25));
 		
-		$obj->set('user_avatar', $this->mFormFile->getFileName());	//< TODO
+			$obj->set('user_avatar', $this->mFormFile->getFileName());	//< TODO
+		}
 	}
 	
 	/**


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