Exemple #1
0
 /**
  * Load the data, don't forget to validate the incoming data
  *
  * @return	void
  */
 private function getData()
 {
     // store the ID
     $this->id = $this->URL->getParameter(1);
     // store the type
     $this->type = SpoonFilter::getGetValue('type', array('html', 'plain'), 'html');
     // is this CM asking the info?
     $this->forCM = SpoonFilter::getGetValue('cm', array(0, 1), 0, 'bool');
     // fetch the mailing data
     $this->record = FrontendMailmotorModel::get($this->id);
     // anything found?
     if (empty($this->record)) {
         $this->redirect(FrontendNavigation::getURL(404));
     }
 }
Exemple #2
0
 /**
  * Load the data, don't forget to validate the incoming data
  */
 protected function loadData()
 {
     $this->id = $this->URL->getParameter(1);
     $this->mailing = FrontendMailmotorModel::get($this->id);
     $this->type = SpoonFilter::getGetValue('type', array('html', 'plain'), 'html');
     $this->forCM = SpoonFilter::getGetValue('cm', array(0, 1), 0, 'bool');
     // no point continueing if the mailing record is not set
     if (empty($this->mailing)) {
         $this->redirect(FrontendNavigation::getURL(404));
     }
 }