http://www.mediawiki.org/wiki/Special:Code/MediaWiki/91485
Revision: 91485 Author: foxtrott Date: 2011-07-05 20:27:14 +0000 (Tue, 05 Jul 2011) Log Message: ----------- followup r91020: bugfix (#autoedit does not correctly process "query string" parameter) 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-07-05 20:24:03 UTC (rev 91484) +++ trunk/extensions/SemanticForms/includes/SF_AutoEditAjaxHandler.php 2011-07-05 20:27:14 UTC (rev 91485) @@ -28,15 +28,10 @@ $title = Title::newFromText( 'DummyTitle' ); -// if ( version_compare( substr( $wgVersion, 0, 4 ), '1.17', '<' ) ) { if ( !StubObject::isRealObject( $wgParser ) ) $wgParser->_unstub(); - // perform offensive operation $wgParser->startExternalParse( $title, ParserOptions::newFromUser( $wgUser ), Parser::OT_HTML, true ); -// } else { -// $wgParser->startExternalParse( $title, ParserOptions::newFromUser( $wgUser ), Parser::OT_HTML, true ); -// } // parse options $this->parseDataFromQueryString( $this->mOptions, $options ); @@ -306,7 +301,7 @@ if ( $key == "query string" ) { $this->parseDataFromQueryString( $data, $value ); } else { - $this->addToArray( $data, $key, $value, true ); + $this->addToArray( $data, $key, $value ); } } @@ -319,7 +314,7 @@ // Format: 1stLevelName[2ndLevel][3rdLevel][...], i.e. normal array notation // $value: the value to insert // $toplevel: if this is a toplevel value. - private function addToArray( &$array, $key, $value, $toplevel = false ) { + private function addToArray( &$array, $key, $value, $toplevel = true ) { $matches = array(); if ( preg_match( '/^([^\[\]]*)\[([^\[\]]*)\](.*)/', $key, $matches ) ) { @@ -336,7 +331,7 @@ if ( !array_key_exists( $key, $array ) ) $array[$key] = array(); - $this->addToArray( $array[$key], $matches[2] . $matches[3], $value ); + $this->addToArray( $array[$key], $matches[2] . $matches[3], $value, false ); } else { if ( $key ) { _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs