1: <?php
2:
3: if (!defined('XOOPS_ROOT_PATH')) exit();
4:
5: require_once XOOPS_ROOT_PATH."/core/XCube_ActionForm.class.php";
6: require_once XOOPS_MODULE_PATH . "/legacy/class/Legacy_Validator.class.php";
7:
8: 9: 10: 11:
12: class Legacy_CommentListForm extends XCube_ActionForm
13: {
14: 15: 16: 17:
18: function getTokenName()
19: {
20:
21:
22: if (xoops_getenv('REQUEST_METHOD') == 'POST') {
23: return "module.legacy.CommentSettingsForm.TOKEN";
24: }
25: else {
26: return null;
27: }
28: }
29:
30: 31: 32: 33:
34: function getTokenErrorMessage()
35: {
36: return null;
37: }
38:
39: function prepare()
40: {
41:
42: $this->mFormProperties['status'] =new XCube_IntArrayProperty('status');
43: $this->mFormProperties['delete']= new XCube_BoolArrayProperty('delete');
44:
45: $this->mFormProperties['confirm'] =new XCube_BoolProperty('confirm');
46:
47:
48: $this->mFieldProperties['status'] =new XCube_FieldProperty($this);
49: $this->mFieldProperties['status']->setDependsByArray(array('required','objectExist'));
50: $this->mFieldProperties['status']->addMessage('required', _MD_LEGACY_ERROR_REQUIRED, _AD_LEGACY_LANG_COM_STATUS);
51: $this->mFieldProperties['status']->addMessage('objectExist', _AD_LEGACY_ERROR_OBJECTEXIST, _AD_LEGACY_LANG_COM_STATUS);
52: $this->mFieldProperties['status']->addVar('handler', 'commentstatus');
53: $this->mFieldProperties['status']->addVar('module', 'legacy');
54:
55: }
56: }
57:
58: ?>
59: