[xoops-cvslog 1793] CVS update: xoops2jp/html/modules/legacyRender/admin/forms

アーカイブの一覧に戻る

Minahito minah****@users*****
2006年 1月 16日 (月) 10:07:04 JST


Index: xoops2jp/html/modules/legacyRender/admin/forms/TplsetEditForm.class.php
diff -u xoops2jp/html/modules/legacyRender/admin/forms/TplsetEditForm.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/forms/TplsetEditForm.class.php:1.1.2.2
--- xoops2jp/html/modules/legacyRender/admin/forms/TplsetEditForm.class.php:1.1.2.1	Sat Jan 14 02:31:14 2006
+++ xoops2jp/html/modules/legacyRender/admin/forms/TplsetEditForm.class.php	Mon Jan 16 10:07:04 2006
@@ -33,6 +33,15 @@
 		return "module.legacyRender.TplsetEditForm.TOKEN";
 	}
 
+	function validateTplset_name()
+	{
+		if ($this->get('tplset_name') != null) {
+			if (!preg_match("/^[a-z0-9\_]+$/i", $this->get('tplset_name'))) {
+				$this->addErrorMessage(_AD_LEGACYRENDER_ERROR_TPLSET_NAME_RULE);
+			}
+		}
+	}
+
 	function load(&$obj)
 	{
 		$this->setVar('tplset_id', $obj->get('tplset_id'));
Index: xoops2jp/html/modules/legacyRender/admin/forms/TplsetCloneForm.class.php
diff -u xoops2jp/html/modules/legacyRender/admin/forms/TplsetCloneForm.class.php:1.1.2.4 xoops2jp/html/modules/legacyRender/admin/forms/TplsetCloneForm.class.php:1.1.2.5
--- xoops2jp/html/modules/legacyRender/admin/forms/TplsetCloneForm.class.php:1.1.2.4	Sat Jan 14 22:19:34 2006
+++ xoops2jp/html/modules/legacyRender/admin/forms/TplsetCloneForm.class.php	Mon Jan 16 10:07:04 2006
@@ -34,6 +34,8 @@
 	
 	function validateTplset_name()
 	{
+		parent::validateTplset_name();
+		
 		//
 		// Check unique name
 		//
@@ -43,11 +45,7 @@
 			if ($handler->getCount(new Criteria('tplset_name', $this->get('tplset_name'))) > 0) {
 				$this->addErrorMessage(_AD_LEGACYRENDER_ERROR_UNIQUE_NAME);
 			}
-			if (!preg_match("/^[a-z0-9\_]+$/i", $this->get('tplset_name'))) {
-				$this->addErrorMessage(_AD_LEGACYRENDER_ERROR_TPLSET_NAME_RULE);
-			}
 		}
-		
 	}
 
 	function load(&$obj)


xoops-cvslog メーリングリストの案内
アーカイブの一覧に戻る