import v1.1.0_beta1 | 2009-08-21
This commit is contained in:
@ -17,7 +17,7 @@
|
||||
* @subpackage Zend_Controller_Action_Helper
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ContextSwitch.php 12315 2008-11-05 22:31:23Z sidhighwind $
|
||||
* @version $Id: ContextSwitch.php 12811 2008-11-24 20:44:26Z matthew $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -114,6 +114,12 @@ class Zend_Controller_Action_Helper_ContextSwitch extends Zend_Controller_Action
|
||||
*/
|
||||
protected $_viewRenderer;
|
||||
|
||||
/**
|
||||
* Original view suffix prior to detecting context switch
|
||||
* @var string
|
||||
*/
|
||||
protected $_viewSuffixOrig;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@ -144,6 +150,25 @@ class Zend_Controller_Action_Helper_ContextSwitch extends Zend_Controller_Action
|
||||
)
|
||||
));
|
||||
}
|
||||
|
||||
$this->init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize at start of action controller
|
||||
*
|
||||
* Reset the view script suffix to the original state, or store the
|
||||
* original state.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
if (null === $this->_viewSuffixOrig) {
|
||||
$this->_viewSuffixOrig = $this->_getViewRenderer()->getViewSuffix();
|
||||
} else {
|
||||
$this->_getViewRenderer()->setViewSuffix($this->_viewSuffixOrig);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -248,6 +273,7 @@ class Zend_Controller_Action_Helper_ContextSwitch extends Zend_Controller_Action
|
||||
}
|
||||
|
||||
$suffix = $this->getSuffix($context);
|
||||
|
||||
$this->_getViewRenderer()->setViewSuffix($suffix);
|
||||
|
||||
$headers = $this->getHeaders($context);
|
||||
|
Reference in New Issue
Block a user