$ctx = $this->getContext();
$outputPage = $ctx->getOutput();
if ( !wfMessage( 'deletereason-dropdown' )->inContentLanguage()->isDisabled() ) {
+ $reasonsList = Xml::getArrayFromWikiTextList(
+ wfMessage( 'deletereason-dropdown' )->inContentLanguage()->text()
+ );
$outputPage->addModules( 'mediawiki.reasonSuggest' );
$outputPage->addJsConfigVars( [
- 'reasons' => 'deletereason-dropdown'
+ 'reasons' => $reasonsList
] );
}
$useMediaWikiUIEverywhere = $ctx->getConfig()->get( 'UseMediaWikiUIEverywhere' );
Hooks::run( 'ArticleConfirmDelete', [ $this, $outputPage, &$reason ] );
$user = $this->getContext()->getUser();
-
if ( $user->isAllowed( 'suppressrevision' ) ) {
$suppress = Html::openElement( 'div', [ 'id' => 'wpDeleteSuppressRow' ] ) .
Xml::checkLabel( wfMessage( 'revdelete-suppress' )->text(),
$suppress = '';
}
$checkWatch = $user->getBoolOption( 'watchdeletion' ) || $user->isWatched( $title );
-
$form = Html::openElement( 'form', [ 'method' => 'post',
'action' => $title->getLocalURL( 'action=delete' ), 'id' => 'deleteconfirm' ] ) .
Html::openElement( 'fieldset', [ 'id' => 'mw-delete-table' ] ) .