/** * Constructor. If nothing else, it also has to call the constructor of the parent * class, BlogAction with the same parameters */ function AdminEditBlockedHostAction($actionInfo, $request) { $this->SiteAdminAction($actionInfo, $request); // data validation stuff $this->registerFieldValidator("hostId", new IntegerValidator()); $view = new AdminBlockedHostsView($this->_blogInfo); $view->setErrorMessage($this->_locale->tr("error_incorrect_host_id")); $this->setValidationErrorView($view); }
/** * Constructor. If nothing else, it also has to call the constructor of the parent * class, BlogAction with the same parameters */ function AdminDeleteBlockedHostAction($actionInfo, $request) { $this->SiteAdminAction($actionInfo, $request); $this->_op = $actionInfo->getActionParamValue(); $view = new AdminBlockedHostsView($this->_blogInfo); if ($this->_op == "deleteBlockedHost") { $this->registerFieldValidator("hostId", new IntegerValidator()); $view->setErrorMessage($this->_locale->tr("error_incorrect_host_id")); } else { $this->registerFieldValidator("deleteBlockedHost", new ArrayValidator()); $view->setErrorMessage($this->_locale->tr("error_no_block_host_selected")); } $this->setValidationErrorView($view); }