From: Tim Starling Date: Thu, 24 Aug 2006 17:01:45 +0000 (+0000) Subject: Exit from AJAX requests properly. Calling exit after doing something is really bad. X-Git-Tag: 1.31.0-rc.0~55913 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=c822e80e8f5e30dc34bdfbc3d12852854fc7499f;p=lhc%2Fweb%2Fwiklou.git Exit from AJAX requests properly. Calling exit after doing something is really bad. --- diff --git a/includes/AjaxDispatcher.php b/includes/AjaxDispatcher.php index 2084c3667a..2704e27dab 100644 --- a/includes/AjaxDispatcher.php +++ b/includes/AjaxDispatcher.php @@ -60,7 +60,7 @@ class AjaxDispatcher { } function performAction() { - global $wgAjaxCachePolicy, $wgAjaxExportList; + global $wgAjaxCachePolicy, $wgAjaxExportList, $wgOut; if ( empty( $this->mode ) ) { return; } @@ -76,7 +76,7 @@ class AjaxDispatcher { echo $result; } wfProfileOut( 'AjaxDispatcher::performAction' ); - exit; + $wgOut = null; } } diff --git a/index.php b/index.php index bd5ffaba37..964770ee4d 100644 --- a/index.php +++ b/index.php @@ -22,7 +22,7 @@ if ( $wgUseAjax && $action == 'ajax' ) { $dispatcher = new AjaxDispatcher(); $dispatcher->performAction(); - + $mediaWiki->restInPeace( $wgLoadBalancer ); exit; }