Skip to content

Commit

Permalink
Better detection of ajax requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Drak committed Apr 21, 2012
1 parent 93abf55 commit 23e9c93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Zikula/Framework/ControllerResolver.php
Expand Up @@ -36,7 +36,7 @@ public function __construct(LoggerInterface $logger = null)

public function getController(Request $request)
{
$method = isset($_GET['type']) && $_GET['type'] == 'ajax' ? 'ajaxDispatch' : 'dispatch';
$method = $request->isXmlHttpRequest() ? 'ajaxDispatch' : 'dispatch';

return array(new ModuleDispatcher, $method);
}
Expand Down

0 comments on commit 23e9c93

Please sign in to comment.