public function preDispatch()
 {
     parent::preDispatch();
     if (!Mage::getSingleton('customer/session')->authenticate($this)) {
         $this->setFlag('', 'no-dispatch', true);
         if (!Mage::getSingleton('customer/session')->getBeforeWishlistUrl()) {
             Mage::getSingleton('customer/session')->setBeforeWishlistUrl($this->_getRefererUrl());
         }
     }
     if (!Mage::getStoreConfigFlag('wishlist/general/active')) {
         $this->norouteAction();
         return;
     }
 }
Пример #2
0
 public function preDispatch()
 {
     parent::preDispatch();
     if (!$this->_skipAuthentication && !Mage::getSingleton('Mage_Customer_Model_Session')->authenticate($this)) {
         $this->setFlag('', 'no-dispatch', true);
         if (!Mage::getSingleton('Mage_Customer_Model_Session')->getBeforeWishlistUrl()) {
             Mage::getSingleton('Mage_Customer_Model_Session')->setBeforeWishlistUrl($this->_getRefererUrl());
         }
         Mage::getSingleton('Mage_Customer_Model_Session')->setBeforeWishlistRequest($this->getRequest()->getParams());
     }
     if (!Mage::getStoreConfigFlag('wishlist/general/active')) {
         $this->norouteAction();
         return;
     }
 }