X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialMovepage.php;h=8b5562f9c713f9cf0fdee1c1e59d11527cfdc386;hb=33b019140f3295edcb0e92f8dc0940e7dc01755d;hp=3ce786e21b61dde45d0ab7a864969661919e9717;hpb=9b05f740f7b04c8c6d21e867e1759da4bcf75eff;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index 3ce786e21b..8b5562f9c7 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -75,7 +75,7 @@ class MovePageForm extends UnlistedSpecialPage { $this->outputHeader(); $request = $this->getRequest(); - $target = !is_null( $par ) ? $par : $request->getVal( 'target' ); + $target = $par ?? $request->getVal( 'target' ); // Yes, the use of getVal() and getText() is wanted, see T22365 @@ -122,7 +122,7 @@ class MovePageForm extends UnlistedSpecialPage { $this->moveOverShared = $request->getBool( 'wpMoveOverSharedFile' ); $this->watch = $request->getCheck( 'wpWatch' ) && $user->isLoggedIn(); - if ( 'submit' == $request->getVal( 'action' ) && $request->wasPosted() + if ( $request->getVal( 'action' ) == 'submit' && $request->wasPosted() && $user->matchEditToken( $request->getVal( 'wpEditToken' ) ) ) { $this->doSubmit(); @@ -333,14 +333,12 @@ class MovePageForm extends UnlistedSpecialPage { // 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). - $conf = $this->getConfig(); - $oldCommentSchema = $conf->get( 'CommentTableSchemaMigrationStage' ) === MIGRATION_OLD; + // Unicode codepoints. $fields[] = new OOUI\FieldLayout( new OOUI\TextInputWidget( [ 'name' => 'wpReason', 'id' => 'wpReason', - 'maxLength' => $oldCommentSchema ? 200 : CommentStore::COMMENT_CHARACTER_LIMIT, + 'maxLength' => CommentStore::COMMENT_CHARACTER_LIMIT, 'infusable' => true, 'value' => $this->reason, ] ),