Fix outputting AJAX
When calling remote functions, MW was outputting the result followed by page HTML. This was caused by calling the cleanup function, which also output the HTML, even after an AJAX request. Fixed by moving the call after AJAX is all safely handled.
This commit is contained in:
parent
94035c764f
commit
fa5ca6db3d
1 changed files with 2 additions and 2 deletions
|
|
@ -494,7 +494,6 @@ class MediaWiki {
|
|||
try {
|
||||
$this->checkMaxLag( true );
|
||||
$this->main();
|
||||
$this->finalCleanup();
|
||||
$this->restInPeace();
|
||||
} catch ( Exception $e ) {
|
||||
MWExceptionHandler::handle( $e );
|
||||
|
|
@ -548,7 +547,7 @@ class MediaWiki {
|
|||
|
||||
# Set title from request parameters
|
||||
$wgTitle = $this->getTitle();
|
||||
$action = $this->context->getRequest()->getVal( 'action', 'view' );
|
||||
$action = $this->getAction();
|
||||
|
||||
# Send Ajax requests to the Ajax dispatcher.
|
||||
if ( $wgUseAjax && $action == 'ajax' ) {
|
||||
|
|
@ -584,6 +583,7 @@ class MediaWiki {
|
|||
}
|
||||
|
||||
$this->performRequest();
|
||||
$this->finalCleanup();
|
||||
|
||||
wfProfileOut( __METHOD__ );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue