From c822e80e8f5e30dc34bdfbc3d12852854fc7499f Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Thu, 24 Aug 2006 17:01:45 +0000 Subject: [PATCH] Exit from AJAX requests properly. Calling exit after doing something is really bad. --- includes/AjaxDispatcher.php | 4 ++-- index.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.20.1