X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FFileDeleteForm.php;h=5aa6edf879c7029bdd6a1c0fff8b3e4587d8b856;hb=faffad7cf802ac4d4344b9fb1b8e9d1258bf6871;hp=f23d6ec0fbb582347bf326ce886d7d1e28286b69;hpb=c0ed2620535b798f2826fecc4ee998380209be5d;p=lhc%2Fweb%2Fwiklou.git
diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php
index f23d6ec0fb..5aa6edf879 100644
--- a/includes/FileDeleteForm.php
+++ b/includes/FileDeleteForm.php
@@ -120,9 +120,10 @@ class FileDeleteForm {
if ( !$status->isGood() ) {
$wgOut->addHTML( '
' . $this->prepareMessage( 'filedeleteerror-short' ) . "
\n" );
- $wgOut->addWikiTextAsInterface( '' .
+ $wgOut->wrapWikiTextAsInterface(
+ 'error',
$status->getWikiText( 'filedeleteerror-short', 'filedeleteerror-long' )
- . '
' );
+ );
}
if ( $status->isOK() ) {
$wgOut->setPageTitle( wfMessage( 'actioncomplete' ) );
@@ -228,7 +229,6 @@ class FileDeleteForm {
$lbFactory->rollbackMasterChanges( __METHOD__ );
}
} else {
- // Done; nothing changed
$dbw->endAtomic( __METHOD__ );
}
}
@@ -246,9 +246,6 @@ class FileDeleteForm {
private function showForm() {
global $wgOut, $wgUser, $wgRequest;
- $conf = RequestContext::getMain()->getConfig();
- $oldCommentSchema = $conf->get( 'CommentTableSchemaMigrationStage' ) === MIGRATION_OLD;
-
$wgOut->addModules( 'mediawiki.action.delete.file' );
$checkWatch = $wgUser->getBoolOption( 'watchdeletion' ) || $wgUser->isWatched( $this->title );
@@ -282,13 +279,13 @@ class FileDeleteForm {
// HTML maxlength uses "UTF-16 code units", which means that characters outside BMP
// (e.g. emojis) count for two each. This limit is overridden in JS to instead count
- // Unicode codepoints (or 255 UTF-8 bytes for old schema).
+ // Unicode codepoints.
$fields[] = new OOUI\FieldLayout(
new OOUI\TextInputWidget( [
'name' => 'wpReason',
'inputId' => 'wpReason',
'tabIndex' => 2,
- 'maxLength' => $oldCommentSchema ? 255 : CommentStore::COMMENT_CHARACTER_LIMIT,
+ 'maxLength' => CommentStore::COMMENT_CHARACTER_LIMIT,
'infusable' => true,
'value' => $wgRequest->getText( 'wpReason' ),
'autofocus' => true,