示例#1
0
 protected function _forward($action, $controller = null, $module = null, array $params = null)
 {
     if (!is_null($module)) {
         $module = Mage::app()->getFrontController()->getRouterByRoute($module)->getFrontNameByRoute($module);
     }
     return parent::_forward($action, $controller, $module, $params);
 }
示例#2
0
 /**
  * Throw control to different action (control and module if was specified).
  *
  * @param string $action
  * @param string|null $controller
  * @param string|null $module
  * @param array|null $params
  * @return null
  */
 protected function _forward($action, $controller = null, $module = null, array $params = null)
 {
     $this->setFlag('', 'forwarded', true);
     return parent::_forward($action, $controller, $module, $params);
 }
 public function registerCaptchaCampaignUserAction()
 {
     $util = Mage::helper('subscribe/CaptchaUtil');
     if (isset($_POST['ecad_challenge'])) {
         $response = $_POST['ecad_response'];
         $chid = $_POST['ecad_challenge'];
         $asid = $_POST['ecad_asid'];
         //        	echo $response.' ';
         //        	echo $chid.' ';
         //        	echo $asid.' ';
         if ($util->validate_user_response($chid, $response, $asid)) {
             return parent::_forward('registerCampaignUser');
         } else {
             $result["error"] = 4;
             $result["message"] = 'Captcha validation was not successful, please try again';
             $result["url"] = "back";
             $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
             return;
         }
     }
     $result["error"] = 5;
     $result["message"] = 'Captcha not submitted, please try again';
     $result["url"] = "back";
     $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
     return;
 }