equal
deleted
inserted
replaced
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Controller |
16 * @package Zend_Controller |
17 * @subpackage Zend_Controller_Action_Helper |
17 * @subpackage Zend_Controller_Action_Helper |
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @version $Id: AjaxContext.php 20096 2010-01-06 02:05:09Z bkarwin $ |
20 * @version $Id: AjaxContext.php 24593 2012-01-05 20:35:02Z matthew $ |
21 */ |
21 */ |
22 |
22 |
23 /** |
23 /** |
24 * @see Zend_Controller_Action_Helper_ContextSwitch |
24 * @see Zend_Controller_Action_Helper_ContextSwitch |
25 */ |
25 */ |
30 * |
30 * |
31 * @uses Zend_Controller_Action_Helper_Abstract |
31 * @uses Zend_Controller_Action_Helper_Abstract |
32 * @category Zend |
32 * @category Zend |
33 * @package Zend_Controller |
33 * @package Zend_Controller |
34 * @subpackage Zend_Controller_Action_Helper |
34 * @subpackage Zend_Controller_Action_Helper |
35 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
35 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
36 * @license http://framework.zend.com/license/new-bsd New BSD License |
36 * @license http://framework.zend.com/license/new-bsd New BSD License |
37 */ |
37 */ |
38 class Zend_Controller_Action_Helper_AjaxContext extends Zend_Controller_Action_Helper_ContextSwitch |
38 class Zend_Controller_Action_Helper_AjaxContext extends Zend_Controller_Action_Helper_ContextSwitch |
39 { |
39 { |
40 /** |
40 /** |
66 */ |
66 */ |
67 public function initContext($format = null) |
67 public function initContext($format = null) |
68 { |
68 { |
69 $this->_currentContext = null; |
69 $this->_currentContext = null; |
70 |
70 |
71 if (!$this->getRequest()->isXmlHttpRequest()) { |
71 $request = $this->getRequest(); |
|
72 if (!method_exists($request, 'isXmlHttpRequest') || |
|
73 !$this->getRequest()->isXmlHttpRequest()) |
|
74 { |
72 return; |
75 return; |
73 } |
76 } |
74 |
77 |
75 return parent::initContext($format); |
78 return parent::initContext($format); |
76 } |
79 } |