$newContent = $content->preSaveTransform( $this->mTitle, $user, $popts );
if ( $newContent->getModel() !== $oldContent->getModel() ) {
// The undo may change content
$newContent = $content->preSaveTransform( $this->mTitle, $user, $popts );
if ( $newContent->getModel() !== $oldContent->getModel() ) {
// The undo may change content
$oldtitlemsg = 'currentrev';
# if message does not exist, show diff against the preloaded default
if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI && !$this->mTitle->exists() ) {
$oldtitlemsg = 'currentrev';
# if message does not exist, show diff against the preloaded default
if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI && !$this->mTitle->exists() ) {
Hooks::run( 'EditPageGetDiffContent', [ $this, &$newContent ] );
$user = $this->context->getUser();
Hooks::run( 'EditPageGetDiffContent', [ $this, &$newContent ] );
$user = $this->context->getUser();
- global $wgContLang, $wgOut;
- global $wgEnableUploads, $wgForeignFileRepos;
+ global $wgOut, $wgEnableUploads, $wgForeignFileRepos;
/**
* $toolarray is an array of arrays each of which includes the
* opening tag, the closing tag, optionally a sample text that is
/**
* $toolarray is an array of arrays each of which includes the
* opening tag, the closing tag, optionally a sample text that is
'close' => ']]',
'sample' => wfMessage( 'image_sample' )->text(),
'tip' => wfMessage( 'image_tip' )->text(),
] : false,
$imagesAvailable ? [
'id' => 'mw-editbutton-media',
'close' => ']]',
'sample' => wfMessage( 'image_sample' )->text(),
'tip' => wfMessage( 'image_tip' )->text(),
] : false,
$imagesAvailable ? [
'id' => 'mw-editbutton-media',
'close' => ']]',
'sample' => wfMessage( 'media_sample' )->text(),
'tip' => wfMessage( 'media_tip' )->text(),
'close' => ']]',
'sample' => wfMessage( 'media_sample' )->text(),
'tip' => wfMessage( 'media_tip' )->text(),