[xoops-cvslog 4866] CVS update: xoops2jp/html/modules/base/forms

Back to archive index

Minahito minah****@users*****
2006年 10月 7日 (土) 15:51:00 JST


Index: xoops2jp/html/modules/base/forms/ImageUploadForm.class.php
diff -u xoops2jp/html/modules/base/forms/ImageUploadForm.class.php:1.1.2.3.2.3 xoops2jp/html/modules/base/forms/ImageUploadForm.class.php:1.1.2.3.2.4
--- xoops2jp/html/modules/base/forms/ImageUploadForm.class.php:1.1.2.3.2.3	Thu Oct  5 18:07:40 2006
+++ xoops2jp/html/modules/base/forms/ImageUploadForm.class.php	Sat Oct  7 15:51:00 2006
@@ -30,8 +30,6 @@
 		//
 		$this->mFieldProperties['image_name'] =& new XCube_FieldProperty($this);
 		$this->mFieldProperties['image_name']->setDependsByArray(array('extension'));
-		$this->mFieldProperties['image_name']->addMessage('required', _MD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_NAME);
-		$this->mFieldProperties['image_name']->addMessage('maxlength', _AD_BASE_ERROR_EXTENSION, _AD_BASE_LANG_IMAGE_NAME);
 		$this->mFieldProperties['image_name']->addVar('extension', 'jpg,gif,png');
 	
 		$this->mFieldProperties['image_nicename'] =& new XCube_FieldProperty($this);
@@ -51,7 +49,7 @@
 	 */	
 	function validateImgcat_id()
 	{
-		$imgcat_id = $this->getImgcatId();
+		$imgcat_id = $this->get('imgcat_id');
 		if ($imgcat_id != null) {
 			$root =& XCube_Root::getSingleton();
 			$xoopsUser =& $root->mController->mRoot->mContext->mXoopsUser;
@@ -77,7 +75,7 @@
 		$formFile = $this->get('image_name');
 		
 		if ($formFile == null && $this->_mIsNew ) {
-			$this->addErrorMessage(_MD_BASE_ERROR_REQUIRED);
+			$this->addErrorMessage(_MD_BASE_ERROR_YOU_MUST_UPLOAD);
 		}
 	}
 	
@@ -86,7 +84,7 @@
 		parent::validate();
 		
 		$handler =& xoops_getmodulehandler('imagecategory', 'base');
-		$category =& $handler->get($this->getImgcatId());
+		$category =& $handler->get($this->get('imgcat_id'));
 		
 		$formFile = $this->get('image_name');
 
@@ -107,11 +105,6 @@
 		}
 	}
 	
-	function getImgcatId()
-	{
-		return $this->get('imgcat_id');
-	}
-
 	function load(&$obj)
 	{
 		$this->set('image_nicename', $obj->get('image_nicename'));
@@ -125,10 +118,10 @@
 	{
 		$obj->set('image_nicename', $this->get('image_nicename'));
 		$obj->set('image_display', true);
-		$obj->set('imgcat_id', $this->getImgcatId());
+		$obj->set('imgcat_id', $this->get('imgcat_id'));
 		
 		$handler =& xoops_getmodulehandler('imagecategory', 'base');
-		$category =& $handler->get($this->getImgcatId());
+		$category =& $handler->get($this->get('imgcat_id'));
 
 		$this->mFormFile = $this->get('image_name');
 		


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