diff -r 000000000000 -r 4eba9c11703f web/Zend/Controller/Action/Helper/AjaxContext.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/Zend/Controller/Action/Helper/AjaxContext.php Mon Dec 13 18:29:26 2010 +0100 @@ -0,0 +1,77 @@ +addContext('html', array('suffix' => 'ajax')); + } + + /** + * Initialize AJAX context switching + * + * Checks for XHR requests; if detected, attempts to perform context switch. + * + * @param string $format + * @return void + */ + public function initContext($format = null) + { + $this->_currentContext = null; + + if (!$this->getRequest()->isXmlHttpRequest()) { + return; + } + + return parent::initContext($format); + } +}