Minahito
minah****@users*****
2006年 3月 30日 (木) 23:56:09 JST
Index: xoops2jp/html/modules/base/admin/forms/CommentAdminEditForm.class.php diff -u xoops2jp/html/modules/base/admin/forms/CommentAdminEditForm.class.php:1.1.2.4 xoops2jp/html/modules/base/admin/forms/CommentAdminEditForm.class.php:1.1.2.5 --- xoops2jp/html/modules/base/admin/forms/CommentAdminEditForm.class.php:1.1.2.4 Thu Mar 30 18:11:37 2006 +++ xoops2jp/html/modules/base/admin/forms/CommentAdminEditForm.class.php Thu Mar 30 23:56:09 2006 @@ -4,7 +4,7 @@ require_once XOOPS_ROOT_PATH . "/class/XCube_ActionForm.class.php"; -class Legacy_CommentAdminEditForm extends XCube_ActionForm +class Legacy_AbstractCommentAdminEditForm extends XCube_ActionForm { function getTokenName() { @@ -50,13 +50,6 @@ $this->mFieldProperties['com_text'] =& new XCube_FieldProperty($this); $this->mFieldProperties['com_text']->setDependsByArray(array('required')); $this->mFieldProperties['com_text']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_COM_TEXT); - - $this->mFieldProperties['com_status'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['com_status']->setDependsByArray(array('required','intRange')); - $this->mFieldProperties['com_status']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_COM_STATUS); - $this->mFieldProperties['com_status']->addMessage('intRange', _AD_BASE_ERROR_INTRANGE, _AD_BASE_LANG_COM_STATUS); - $this->mFieldProperties['com_status']->addVar('min', '1'); - $this->mFieldProperties['com_status']->addVar('max', '3'); } function load(&$obj) @@ -90,4 +83,35 @@ } } +class Legacy_PendingCommentAdminEditForm extends Legacy_AbstractCommentAdminEditForm +{ + function prepare() + { + parent::prepare(); + + $this->mFieldProperties['com_status'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['com_status']->setDependsByArray(array('required','intRange')); + $this->mFieldProperties['com_status']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_COM_STATUS); + $this->mFieldProperties['com_status']->addMessage('intRange', _AD_BASE_ERROR_INTRANGE, _AD_BASE_LANG_COM_STATUS); + $this->mFieldProperties['com_status']->addVar('min', '1'); + $this->mFieldProperties['com_status']->addVar('max', '3'); + } +} + +class Legacy_ApprovalCommentAdminEditForm extends Legacy_AbstractCommentAdminEditForm +{ + function prepare() + { + parent::prepare(); + + $this->mFieldProperties['com_status'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['com_status']->setDependsByArray(array('required','intRange')); + $this->mFieldProperties['com_status']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_COM_STATUS); + $this->mFieldProperties['com_status']->addMessage('intRange', _AD_BASE_ERROR_INTRANGE, _AD_BASE_LANG_COM_STATUS); + $this->mFieldProperties['com_status']->addVar('min', '2'); + $this->mFieldProperties['com_status']->addVar('max', '3'); + } +} + + ?>