Got rid of about 20 regex calls in braceSubstitution() relating to function-like...
[lhc/web/wiklou.git] / index.php
index bc52779..f18fa8a 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Main wiki script; see docs/design.txt
  * @package MediaWiki
  */
-$wgRequestTime = microtime();
+$wgRequestTime = microtime(true);
 
 # getrusage() does not exist on the Microsoft Windows platforms, catching this
 if ( function_exists ( 'getrusage' ) ) {
@@ -90,6 +90,18 @@ OutputPage::setEncodings(); # Not really used yet
 $action = $wgRequest->getVal( 'action', 'view' );
 $title = $wgRequest->getVal( 'title' );
 
+#
+# Send Ajax requests to the Ajax dispatcher.
+#
+if ( $wgUseAjax && $action == 'ajax' ) {
+       require_once( 'AjaxDispatcher.php' );
+
+       $dispatcher = new AjaxDispatcher();
+       $dispatcher->performAction();
+
+       exit;
+}
+
 $wgTitle = $mediaWiki->checkInitialQueries( $title,$action,$wgOut, $wgRequest, $wgContLang );
 if ($wgTitle == NULL) {
        unset( $wgTitle );