Minahito
minah****@users*****
2006年 7月 27日 (木) 18:41:49 JST
Index: xoops2jp/html/modules/pm/forms/DeleteOneForm.class.php diff -u /dev/null xoops2jp/html/modules/pm/forms/DeleteOneForm.class.php:1.1.2.1 --- /dev/null Thu Jul 27 18:41:49 2006 +++ xoops2jp/html/modules/pm/forms/DeleteOneForm.class.php Thu Jul 27 18:41:49 2006 @@ -0,0 +1,43 @@ +<?php + +if (!defined('XOOPS_ROOT_PATH')) exit(); + +require_once XOOPS_ROOT_PATH . "/class/XCube_ActionForm.class.php"; +require_once XOOPS_MODULE_PATH . "/base/class/Legacy_Validator.class.php"; + +class Pm_DeleteOneForm extends XCube_ActionForm +{ + function getTokenName() + { + return "module.pm.DeleteOneForm.TOKEN" . $this->get('msg_id'); + } + + function prepare() + { + // + // Set form properties + // + $this->mFormProperties['msg_id'] =& new XCube_IntProperty('msg_id'); + + // + // Set field properties + // + $this->mFieldProperties['msg_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['msg_id']->setDependsByArray(array('required','objectExist')); + $this->mFieldProperties['msg_id']->addMessage('required', _MD_PM_ERROR_REQUIRED, _MD_PM_LANG_MSG_ID); + $this->mFieldProperties['msg_id']->addMessage('objectExist', _MD_PM_ERROR_OBJECTEXIST, _MD_PM_LANG_MSG_ID); + $this->mFieldProperties['msg_id']->addVar('handler', 'privmessage'); + } + + function load(&$obj) + { + $this->set('msg_id', $obj->get('msg_id')); + } + + function update(&$obj) + { + $obj->set('msg_id', $this->get('msg_id')); + } +} + +?>