Minahito
minah****@users*****
2006年 2月 21日 (火) 20:47:37 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.1 xoops2jp/html/modules/base/admin/forms/CommentAdminEditForm.class.php:1.1.2.2 --- xoops2jp/html/modules/base/admin/forms/CommentAdminEditForm.class.php:1.1.2.1 Thu Jan 26 01:17:45 2006 +++ xoops2jp/html/modules/base/admin/forms/CommentAdminEditForm.class.php Tue Feb 21 20:47:36 2006 @@ -2,14 +2,11 @@ require_once XOOPS_ROOT_PATH . "/class/XCube_ActionForm.class.php"; -/** - * This class is generated by makeActionForm tool. - */ class Legacy_CommentAdminEditForm extends XCube_ActionForm { function getTokenName() { - return "module.base.XoopscommentsAdminEditForm.TOKEN"; + return "module.base.CommentAdminEditForm.TOKEN" . $this->get('com_id'); } function prepare() @@ -18,136 +15,69 @@ // Set form properties // $this->mFormProperties['com_id'] =& new XCube_IntProperty('com_id'); - $this->mFormProperties['com_pid'] =& new XCube_IntProperty('com_pid'); - $this->mFormProperties['com_rootid'] =& new XCube_IntProperty('com_rootid'); - $this->mFormProperties['com_modid'] =& new XCube_IntProperty('com_modid'); - $this->mFormProperties['com_itemid'] =& new XCube_IntProperty('com_itemid'); $this->mFormProperties['com_icon'] =& new XCube_StringProperty('com_icon'); - $this->mFormProperties['com_created'] =& new XCube_IntProperty('com_created'); - $this->mFormProperties['com_modified'] =& new XCube_IntProperty('com_modified'); - $this->mFormProperties['com_uid'] =& new XCube_IntProperty('com_uid'); - $this->mFormProperties['com_ip'] =& new XCube_StringProperty('com_ip'); $this->mFormProperties['com_title'] =& new XCube_StringProperty('com_title'); $this->mFormProperties['com_text'] =& new XCube_TextProperty('com_text'); $this->mFormProperties['com_sig'] =& new XCube_BoolProperty('com_sig'); $this->mFormProperties['com_status'] =& new XCube_BoolProperty('com_status'); - $this->mFormProperties['com_exparams'] =& new XCube_StringProperty('com_exparams'); $this->mFormProperties['dohtml'] =& new XCube_BoolProperty('dohtml'); $this->mFormProperties['dosmiley'] =& new XCube_BoolProperty('dosmiley'); $this->mFormProperties['doxcode'] =& new XCube_BoolProperty('doxcode'); $this->mFormProperties['doimage'] =& new XCube_BoolProperty('doimage'); $this->mFormProperties['dobr'] =& new XCube_BoolProperty('dobr'); - + // // Set field properties // + $this->mFieldProperties['com_id'] =& new XCube_FieldProperty($this); $this->mFieldProperties['com_id']->setDependsByArray(array('required')); $this->mFieldProperties['com_id']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_COM_ID); - - $this->mFieldProperties['com_pid'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['com_pid']->setDependsByArray(array('required')); - $this->mFieldProperties['com_pid']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_COM_PID); - - $this->mFieldProperties['com_rootid'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['com_rootid']->setDependsByArray(array('required')); - $this->mFieldProperties['com_rootid']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_COM_ROOTID); - - $this->mFieldProperties['com_modid'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['com_modid']->setDependsByArray(array('required')); - $this->mFieldProperties['com_modid']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_COM_MODID); - - $this->mFieldProperties['com_itemid'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['com_itemid']->setDependsByArray(array('required')); - $this->mFieldProperties['com_itemid']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_COM_ITEMID); - + $this->mFieldProperties['com_icon'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['com_icon']->setDependsByArray(array('required','maxlength')); - $this->mFieldProperties['com_icon']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_COM_ICON, '25'); + $this->mFieldProperties['com_icon']->setDependsByArray(array('maxlength')); $this->mFieldProperties['com_icon']->addMessage('maxlength', _AD_BASE_ERROR_MAXLENGTH, _AD_BASE_LANG_COM_ICON, '25'); - $this->mFieldProperties['com_icon']->addVar('maxlength', 25); - - $this->mFieldProperties['com_created'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['com_created']->setDependsByArray(array('required')); - $this->mFieldProperties['com_created']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_COM_CREATED); - - $this->mFieldProperties['com_modified'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['com_modified']->setDependsByArray(array('required')); - $this->mFieldProperties['com_modified']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_COM_MODIFIED); - - $this->mFieldProperties['com_uid'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['com_uid']->setDependsByArray(array('required')); - $this->mFieldProperties['com_uid']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_COM_UID); - - $this->mFieldProperties['com_ip'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['com_ip']->setDependsByArray(array('required','maxlength')); - $this->mFieldProperties['com_ip']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_COM_IP, '15'); - $this->mFieldProperties['com_ip']->addMessage('maxlength', _AD_BASE_ERROR_MAXLENGTH, _AD_BASE_LANG_COM_IP, '15'); - $this->mFieldProperties['com_ip']->addVar('maxlength', 15); - + $this->mFieldProperties['com_icon']->addVar('maxlength', '25'); + $this->mFieldProperties['com_title'] =& new XCube_FieldProperty($this); $this->mFieldProperties['com_title']->setDependsByArray(array('required','maxlength')); $this->mFieldProperties['com_title']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_COM_TITLE, '255'); $this->mFieldProperties['com_title']->addMessage('maxlength', _AD_BASE_ERROR_MAXLENGTH, _AD_BASE_LANG_COM_TITLE, '255'); - $this->mFieldProperties['com_title']->addVar('maxlength', 255); - + $this->mFieldProperties['com_title']->addVar('maxlength', '255'); + $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_exparams'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['com_exparams']->setDependsByArray(array('required','maxlength')); - $this->mFieldProperties['com_exparams']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_COM_EXPARAMS, '255'); - $this->mFieldProperties['com_exparams']->addMessage('maxlength', _AD_BASE_ERROR_MAXLENGTH, _AD_BASE_LANG_COM_EXPARAMS, '255'); - $this->mFieldProperties['com_exparams']->addVar('maxlength', 255); } function load(&$obj) { - $this->setVar('com_id', $obj->get('com_id')); - $this->setVar('com_pid', $obj->get('com_pid')); - $this->setVar('com_rootid', $obj->get('com_rootid')); - $this->setVar('com_modid', $obj->get('com_modid')); - $this->setVar('com_itemid', $obj->get('com_itemid')); - $this->setVar('com_icon', $obj->get('com_icon')); - $this->setVar('com_created', $obj->get('com_created')); - $this->setVar('com_modified', $obj->get('com_modified')); - $this->setVar('com_uid', $obj->get('com_uid')); - $this->setVar('com_ip', $obj->get('com_ip')); - $this->setVar('com_title', $obj->get('com_title')); - $this->setVar('com_text', $obj->get('com_text')); - $this->setVar('com_sig', $obj->get('com_sig')); - $this->setVar('com_status', $obj->get('com_status')); - $this->setVar('com_exparams', $obj->get('com_exparams')); - $this->setVar('dohtml', $obj->get('dohtml')); - $this->setVar('dosmiley', $obj->get('dosmiley')); - $this->setVar('doxcode', $obj->get('doxcode')); - $this->setVar('doimage', $obj->get('doimage')); - $this->setVar('dobr', $obj->get('dobr')); + $this->set('com_id', $obj->get('com_id')); + $this->set('com_icon', $obj->get('com_icon')); + $this->set('com_title', $obj->get('com_title')); + $this->set('com_text', $obj->get('com_text')); + $this->set('com_sig', $obj->get('com_sig')); + $this->set('com_status', $obj->get('com_status')); + $this->set('dohtml', $obj->get('dohtml')); + $this->set('dosmiley', $obj->get('dosmiley')); + $this->set('doxcode', $obj->get('doxcode')); + $this->set('doimage', $obj->get('doimage')); + $this->set('dobr', $obj->get('dobr')); } function update(&$obj) { - $obj->setVar('com_id', $this->get('com_id')); - $obj->setVar('com_pid', $this->get('com_pid')); - $obj->setVar('com_rootid', $this->get('com_rootid')); - $obj->setVar('com_modid', $this->get('com_modid')); - $obj->setVar('com_itemid', $this->get('com_itemid')); - $obj->setVar('com_icon', $this->get('com_icon')); - $obj->setVar('com_created', $this->get('com_created')); - $obj->setVar('com_modified', $this->get('com_modified')); - $obj->setVar('com_uid', $this->get('com_uid')); - $obj->setVar('com_ip', $this->get('com_ip')); - $obj->setVar('com_title', $this->get('com_title')); - $obj->setVar('com_text', $this->get('com_text')); - $obj->setVar('com_sig', $this->get('com_sig')); - $obj->setVar('com_status', $this->get('com_status')); - $obj->setVar('com_exparams', $this->get('com_exparams')); - $obj->setVar('dohtml', $this->get('dohtml')); - $obj->setVar('dosmiley', $this->get('dosmiley')); - $obj->setVar('doxcode', $this->get('doxcode')); - $obj->setVar('doimage', $this->get('doimage')); - $obj->setVar('dobr', $this->get('dobr')); + $obj->set('com_id', $this->get('com_id')); + $obj->set('com_icon', $this->get('com_icon')); + $obj->set('com_title', $this->get('com_title')); + $obj->set('com_text', $this->get('com_text')); + $obj->set('com_sig', $this->get('com_sig')); + $obj->set('com_status', $this->get('com_status')); + $obj->set('dohtml', $this->get('dohtml')); + $obj->set('dosmiley', $this->get('dosmiley')); + $obj->set('doxcode', $this->get('doxcode')); + $obj->set('doimage', $this->get('doimage')); + $obj->set('dobr', $this->get('dobr')); } }