diff -r bd595ad770fc -r 1c2f13fd785c web/enmi/Zend/Controller/Action/Helper/AjaxContext.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/enmi/Zend/Controller/Action/Helper/AjaxContext.php Thu Jan 20 19:30:54 2011 +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); + } +}