Use the AutoLoader to load the AjaxDispatcher class
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 8 Dec 2010 10:00:25 +0000 (10:00 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 8 Dec 2010 10:00:25 +0000 (10:00 +0000)
includes/AjaxDispatcher.php
index.php

index 16e5301..5ee14a5 100644 (file)
@@ -7,7 +7,7 @@
  * Handle ajax requests and send them to the proper handler.
  */
 
-if ( !( defined( 'MEDIAWIKI' ) && $wgUseAjax ) ) {
+if ( !defined( 'MEDIAWIKI' ) ) {
        die( 1 );
 }
 
index 7c61f77..7469866 100644 (file)
--- a/index.php
+++ b/index.php
@@ -59,11 +59,8 @@ $wgTitle = $mediaWiki->checkInitialQueries( $title, $action );
 
 wfProfileOut( 'main-misc-setup' );
 
-#
 # Send Ajax requests to the Ajax dispatcher.
-#
 if( $wgUseAjax && $action == 'ajax' ) {
-       require_once( $IP . '/includes/AjaxDispatcher.php' );
        $dispatcher = new AjaxDispatcher();
        $dispatcher->performAction();
        $mediaWiki->restInPeace();