XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
NotifyDeleteForm.class.php
1<?php
10
11if (!defined('XOOPS_ROOT_PATH')) {
12 exit();
13}
14
15require_once XOOPS_ROOT_PATH . '/core/XCube_ActionForm.class.php';
16require_once XOOPS_MODULE_PATH . '/legacy/class/Legacy_Validator.class.php';
17
19{
20 public $mNotifiyIds = [];
21 public $mFatalError = false;
22
23 public function getTokenName()
24 {
25 return 'POST' == $_SERVER['REQUEST_METHOD'] ? 'module.legacy.NotifyDeleteForm.TOKEN' : null;
26 }
27
28 public function fetch()
29 {
30 parent::fetch();
31
32 $root =& XCube_Root::getSingleton();
33 $t_arr = $root->mContext->mRequest->getRequest('del_not');
34
35 if (!is_array($t_arr)) {
36 $this->addErrorMessage(_MD_LEGACY_LANG_ERROR);
37 $this->mFatalError = true;
38 return;
39 }
40
41 foreach ($t_arr as $t_modid => $t_idArr) {
42 if (!is_array($t_idArr)) {
43 $this->addErrorMessage(_MD_LEGACY_LANG_ERROR);
44 $this->mFatalError = true;
45 return;
46 }
47 foreach ($t_idArr as $t_id) {
48 $this->mNotifiyIds[] = ['modid' => (int)$t_modid, 'id' => (int)$t_id];
49 }
50 }
51 }
52}
getTokenName()
Gets the token name of this actionform's token.
fetch()
Fetches values through the request object.
addErrorMessage( $message)
Adds a message to the form's error message buffer.