Exit from AJAX requests properly. Calling exit after doing something is really bad.
[lhc/web/wiklou.git] / includes / AjaxDispatcher.php
index 2084c36..2704e27 100644 (file)
@@ -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;
        }
 }