Minahito
minah****@users*****
2006年 1月 14日 (土) 19:00:52 JST
Index: xoops2jp/html/modules/legacyRender/admin/forms/TplsetCloneForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/TplsetCloneForm.class.php:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/forms/TplsetCloneForm.class.php:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/forms/TplsetCloneForm.class.php:1.1.2.2 Sat Jan 14 03:25:38 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/TplsetCloneForm.class.php Sat Jan 14 19:00:52 2006 @@ -38,10 +38,16 @@ // Check unique name // $handler = xoops_getmodulehandler('tplset'); - - if ($handler->getCount(new Criteria('tplset_name', $this->get('tplset_name'))) > 0) { - $this->addErrorMessage(_AD_LEGACYRENDER_ERROR_UNIQUE_NAME); + + if ($this->get('tplset_name') != null) { + 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_]+$/", $this->get('tplset_name'))) { + $this->addErrorMessage(_AD_LEGACYRENDER_ERROR_TPLSET_NAME_RULE); + } } + } function load(&$obj)