http://www.mediawiki.org/wiki/Special:Code/MediaWiki/91213
Revision: 91213 Author: foxtrott Date: 2011-06-30 19:58:27 +0000 (Thu, 30 Jun 2011) Log Message: ----------- bugfix: reset wgRequest to old value before leaving method Modified Paths: -------------- trunk/extensions/SemanticForms/includes/SF_AutoEditAjaxHandler.php Modified: trunk/extensions/SemanticForms/includes/SF_AutoEditAjaxHandler.php =================================================================== --- trunk/extensions/SemanticForms/includes/SF_AutoEditAjaxHandler.php 2011-06-30 19:55:15 UTC (rev 91212) +++ trunk/extensions/SemanticForms/includes/SF_AutoEditAjaxHandler.php 2011-06-30 19:58:27 UTC (rev 91213) @@ -123,6 +123,7 @@ if ( !$form ) { // something went wrong + $wgRequest = $oldRequest; return array( 'autoedit-nosemanticform', array( @@ -151,19 +152,18 @@ $wgParser->getOptions()->enableLimitReport( false ); + $wgRequest = $oldRequest; + if ( $formedit->mError ) { - // TODO Should this be sanitized? i.e. all HTML tags removed? - $msg = $formedit->mError; $msg = $wgParser->parse( - wfMsgReplaceArgs( $this->mOptions['error text'], array( $msg ) ), + wfMsgReplaceArgs( $this->mOptions['error text'], array( $formedit->mError ) ), $wgTitle, $wgParser->getOptions() )->getText(); $result = new AjaxResponse( $msg ); $result->setResponseCode( '400 Bad Request' ); - return $result; } else { header( "X-Location: " . $wgOut->getRedirect() ); @@ -173,8 +173,9 @@ $msg = $wgParser->recursiveTagParse( wfMsgReplaceArgs( $this->mOptions['ok text'], array( $formedit->mTarget, $formedit->mForm ) ) ); $result = new AjaxResponse( $msg ); - return $result; } + + return $result; } private function parseDataFromHTMLFrag ( &$data, $html, $formID ) { _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs