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

Back to archive index

Minahito minah****@users*****
2006年 10月 7日 (土) 16:11:59 JST


Index: xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php
diff -u xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.8.2.2 xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.8.2.3
--- xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.8.2.2	Fri Sep 29 17:13:50 2006
+++ xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php	Sat Oct  7 16:11:58 2006
@@ -1,7 +1,7 @@
 <?php
 /**
  * @package Legacy
- * @version $Id: ImageAdminEditForm.class.php,v 1.1.2.8.2.2 2006/09/29 08:13:50 minahito Exp $
+ * @version $Id: ImageAdminEditForm.class.php,v 1.1.2.8.2.3 2006/10/07 07:11:58 minahito Exp $
  */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
@@ -10,7 +10,7 @@
 require_once XOOPS_MODULE_PATH . "/base/class/Legacy_Validator.class.php";
 require_once XOOPS_MODULE_PATH . "/base/forms/ImageUploadForm.class.php";
 
-class Legacy_ImageAdminEditForm extends Legacy_ImageUploadForm
+class Legacy_ImageAdminCreateForm extends Legacy_ImageUploadForm
 {
 	var $_mImgcatId = 0;
 	
@@ -52,11 +52,6 @@
 		$this->_mImgcatId = $obj->get('imgcat_id');
 	}
 	
-	function getImgcatId()
-	{
-		return $this->_mIsNew ? $this->get('imgcat_id') : $this->_mImgcatId;
-	}
-
 	function update(&$obj)
 	{
 		parent::update($obj);
@@ -66,4 +61,20 @@
 	}
 }
 
+class Legacy_ImageAdminEditForm extends Legacy_ImageAdminCreateForm
+{
+	function validateImgcat_id()
+	{
+		parent::validateImgcat_id();
+		
+		$handler =& xoops_getmodulehandler('imagecategory', 'base');
+		$currentCategory =& $handler->get($this->_mImgcatId);
+		
+		$specificCategory =& $handler->get($this->get('imgcat_id'));
+		if ($currentCategory->get('imgcat_storetype') != $specificCategory->get('imgcat_storetype')) {
+			$this->set('imgcat_id', $this->_mImgcatId);
+		}
+	}
+}
+
 ?>
Index: xoops2jp/html/modules/base/admin/forms/SmilesAdminEditForm.class.php
diff -u xoops2jp/html/modules/base/admin/forms/SmilesAdminEditForm.class.php:1.1.2.4.2.2 xoops2jp/html/modules/base/admin/forms/SmilesAdminEditForm.class.php:1.1.2.4.2.3
--- xoops2jp/html/modules/base/admin/forms/SmilesAdminEditForm.class.php:1.1.2.4.2.2	Fri Sep 29 17:13:50 2006
+++ xoops2jp/html/modules/base/admin/forms/SmilesAdminEditForm.class.php	Sat Oct  7 16:11:58 2006
@@ -1,7 +1,7 @@
 <?php
 /**
  * @package Legacy
- * @version $Id: SmilesAdminEditForm.class.php,v 1.1.2.4.2.2 2006/09/29 08:13:50 minahito Exp $
+ * @version $Id: SmilesAdminEditForm.class.php,v 1.1.2.4.2.3 2006/10/07 07:11:58 minahito Exp $
  */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
@@ -58,7 +58,7 @@
 	function validateSmile_url()
 	{
 		if ($this->_mIsNew && $this->get('smile_url') == null) {
-			$this->addErrorMessage(_AD_BASE_ERROR_SMILE_URL_REQUIED);
+			$this->addErrorMessage(XCube_Utils::formatMessage(_MD_BASE_ERROR_REQUIRED, _MD_BASE_LANG_SMILE_URL));
 		}
 	}
 


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