'required|array_db regexps.regexpid' ]; $ret = $this->validateInput($fields); if (!$ret) { $this->setResponse(new CControllerResponseFatal()); } return $ret; } protected function checkPermissions() { return $this->checkAccess(CRoleHelper::UI_ADMINISTRATION_GENERAL); } protected function doAction() { $regexids = $this->getinput('regexids'); $result = API::Regexp()->delete($regexids); $response = new CControllerResponseRedirect((new CUrl('zabbix.php'))->setArgument('action', 'regex.list')); if ($result) { $response->setFormData(['uncheck' => '1']); CMessageHelper::setSuccessTitle(_n('Regular expression deleted', 'Regular expressions deleted', count($regexids) )); } else { CMessageHelper::setErrorTitle(_n('Cannot delete regular expression', 'Cannot delete regular expressions', count($regexids) )); } $this->setResponse($response); } }