X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FProtectionForm.php;h=7972a1ebe45a0c7ec23157ad588b503480858ccd;hb=d830ad1917c3665bc5362cac9703e4de9ae89add;hp=bb8eba125f20b6bfe8d9290adef8f6d83478125c;hpb=0770f85a0a293e6c7af6f1d3d3a1dbd2d13c1e09;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index bb8eba125f..7972a1ebe4 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -353,13 +353,9 @@ class ProtectionForm { $user = $context->getUser(); $output = $context->getOutput(); $lang = $context->getLanguage(); - $conf = $context->getConfig(); - $cascadingRestrictionLevels = $conf->get( 'CascadingRestrictionLevels' ); - $oldCommentSchema = $conf->get( 'CommentTableSchemaMigrationStage' ) === MIGRATION_OLD; $out = ''; if ( !$this->disabled ) { $output->addModules( 'mediawiki.legacy.protect' ); - $output->addJsConfigVars( 'wgCascadeableLevels', $cascadingRestrictionLevels ); $out .= Xml::openElement( 'form', [ 'method' => 'post', 'action' => $this->mTitle->getLocalURL( 'action=protect' ), 'id' => 'mw-Protect-Form' ] ); @@ -502,10 +498,10 @@ class ProtectionForm { // 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 180 UTF-8 bytes for old schema). + // Unicode codepoints. // Subtract arbitrary 75 to leave some space for the autogenerated null edit's summary // and other texts chosen by dropdown menus on this page. - $maxlength = $oldCommentSchema ? 180 : CommentStore::COMMENT_CHARACTER_LIMIT - 75; + $maxlength = CommentStore::COMMENT_CHARACTER_LIMIT - 75; $out .= Xml::openElement( 'table', [ 'id' => 'mw-protect-table3' ] ) . Xml::openElement( 'tbody' ); @@ -626,10 +622,9 @@ class ProtectionForm { /** * Show protection long extracts for this page * - * @param OutputPage &$out - * @access private + * @param OutputPage $out */ - function showLogExtract( &$out ) { + private function showLogExtract( OutputPage $out ) { # Show relevant lines from the protection log: $protectLogPage = new LogPage( 'protect' ); $out->addHTML( Xml::element( 'h2', null, $protectLogPage->getName()->text() ) );