* @ingroup Maintenance
*/
+use MediaWiki\MediaWikiServices;
+
$optionsWithoutArgs = [ 'verbose' ];
require_once __DIR__ . '/commandLine.inc';
// This resolves a few differences between the old preprocessor and the
// XML-based one, which doesn't like illegals and converts line endings.
// It's done by the MW UI, so it's a reasonably legitimate thing to do.
- global $wgContLang;
- $s = $wgContLang->normalize( $s );
+ $s = MediaWikiServices::getInstance()->getContentLanguage()->normalize( $s );
return $s;
}
}
function execute() {
- global $wgParser, $wgUser;
+ global $wgUser;
$wgUser = new PPFuzzUser;
$wgUser->mName = 'Fuzz';
$options->setTemplateCallback( [ $this, 'templateHook' ] );
$options->setTimestamp( wfTimestampNow() );
$this->output = call_user_func(
- [ $wgParser, $this->entryPoint ],
+ [ MediaWikiServices::getInstance()->getParser(), $this->entryPoint ],
$this->mainText,
$this->title,
$options
class PPFuzzUser extends User {
public $ppfz_test, $mDataLoaded;
- function load() {
+ function load( $flags = null ) {
if ( $this->mDataLoaded ) {
return;
}