/** @var bool Has a summary been preset using GET parameter &summary= ? */
public $hasPresetSummary = false;
- /** @var bool */
+ /** @var Revision|bool */
public $mBaseRevision = false;
/** @var bool */
$remove = [];
foreach ( $permErrors as $error ) {
if ( ( $this->preview || $this->diff )
- && ( $error[0] == 'blockedtext' || $error[0] == 'autoblockedtext' )
+ && (
+ $error[0] == 'blockedtext' ||
+ $error[0] == 'autoblockedtext' ||
+ $error[0] == 'systemblockedtext'
+ )
) {
$remove[] = $error;
}
}
function setHeaders() {
- global $wgOut, $wgUser, $wgAjaxEditStash;
+ global $wgOut, $wgUser, $wgAjaxEditStash, $wgCookieSetOnAutoblock;
$wgOut->addModules( 'mediawiki.action.edit' );
+ if ( $wgCookieSetOnAutoblock === true ) {
+ $wgOut->addModules( 'mediawiki.user.blockcookie' );
+ }
$wgOut->addModuleStyles( 'mediawiki.action.edit.styles' );
if ( $wgUser->getOption( 'showtoolbar' ) ) {
}
if ( $newContent ) {
- ContentHandler::runLegacyHooks( 'EditPageGetDiffText', [ $this, &$newContent ], '1.21' );
Hooks::run( 'EditPageGetDiffContent', [ $this, &$newContent ] );
$popts = ParserOptions::newFromUserAndLang( $wgUser, $wgContLang );
*
* @param Title $title
* @param string $format Output format, valid values are any function of a Message object
+ * @param Language|string|null $langcode Language code or Language object.
* @return string
*/
public static function getCopyrightWarning( $title, $format = 'plain', $langcode = null ) {
/**
* Returns an array of html code of the following buttons:
- * save, diff, preview and live
+ * save, diff and preview
*
* @param int $tabindex Current tabindex
*
] + Linker::tooltipAndAccesskeyAttribs( 'preview' );
$buttons['preview'] = Html::submitButton( $this->context->msg( 'showpreview' )->text(),
$attribs );
- $buttons['live'] = '';
$attribs = [
'id' => 'wpDiff',