1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| <?php
class Feng_Controller_Plugin_Back extends Zend_Controller_Plugin_Abstract {
protected $_request;
protected $_unregistred_controller = array('message');
public function preDispatch(Zend_Controller_Request_Abstract $request){
$this->_request = $request;
}
public function dispatchLoopShutdown(){
if(!in_array($this->_request->getControllerName(),$this->_unregistred_controller)){
$navig = new Zend_Session_Namespace('navigation');
$navig->backUrlByPlugin = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
}
}
} |