public function preDispatch()
 {
     parent::preDispatch();
     if (!$this->_hasParam('luogo')) {
         $this->_helper->redirector('index', 'index');
     }
     $this->view->luogo = Mappa_Model_Luogo::getByUrl($this->_getParam('luogo'));
 }
Ejemplo n.º 2
0
 public function preDispatch()
 {
     parent::preDispatch();
     if (!$this->_hasParam('luogo')) {
         $this->_helper->redirector('index', 'index', 'mappa');
     }
     $this->view->luogo = Mappa_Model_Luogo::getByUrl($this->_getParam('luogo'));
     if (strtotime(Zend_Auth::getInstance()->getIdentity()->PrisonDate) > time() && !$this->view->luogo->IsPrison) {
         $Prison = Mappa_Model_Luogo::get(Zend_Auth::getInstance()->getIdentity()->PrisonLocation);
         $this->_redirect($this->view->url(array('luogo' => $Prison->Url), 'chat'));
     }
 }