/** * The main method called by the controller * * @return array The probably modified GET/POST parameters */ public function process() { $isSpam = $this->doCheck(); if ($isSpam) { $this->log(TRUE); if ($this->settings['redirectPage']) { Tx_Formhandler_Globals::$session->reset(); Tx_Formhandler_Staticfuncs::doRedirect($this->settings['redirectPage'], $this->settings['correctRedirectUrl'], $this->settings['additionalParams.']); return 'Lousy spammer!'; } else { $view = $this->componentManager->getComponent('Tx_Formhandler_View_AntiSpam'); $view->setLangFiles(Tx_Formhandler_Globals::$langFiles); $view->setPredefined($this->predefined); $templateCode = Tx_Formhandler_Globals::$templateCode; $view->setTemplate($templateCode, 'ANTISPAM'); if (!$view->hasTemplate()) { Tx_Formhandler_StaticFuncs::throwException('spam_detected'); return 'Lousy spammer!'; } $content = $view->render($this->gp, array()); Tx_Formhandler_Globals::$session->reset(); return $content; } } return $this->gp; }
/** * The main method called by the controller * * @return array The probably modified GET/POST parameters */ public function process() { //read redirect page $redirectPage = Tx_Formhandler_StaticFuncs::getSingle($this->settings, 'redirectPage'); if (!isset($redirectPage)) { return $this->gp; } Tx_Formhandler_Globals::$session->reset(); Tx_Formhandler_Staticfuncs::doRedirect($redirectPage, $this->settings['correctRedirectUrl'], $this->settings['additionalParams.']); exit; }