X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FMovePage.php;h=fc9f6a6676614227ffe2c87c5f6521bf63641f24;hb=4d41c56e94f219b5930fd057c266f501a85955a2;hp=39dc6424db16d348572bd50c12f37c3e3a68643a;hpb=a70c4a4c466db5663b845889cacdef00d7200760;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MovePage.php b/includes/MovePage.php index 39dc6424db..fc9f6a6676 100644 --- a/includes/MovePage.php +++ b/includes/MovePage.php @@ -310,7 +310,7 @@ class MovePage { # Protect the redirect title as the title used to be... $res = $dbw->select( 'page_restrictions', - '*', + [ 'pr_type', 'pr_level', 'pr_cascade', 'pr_user', 'pr_expiry' ], [ 'pr_page' => $pageid ], __METHOD__, 'FOR UPDATE' @@ -442,7 +442,6 @@ class MovePage { private function moveToInternal( User $user, &$nt, $reason = '', $createRedirect = true, array $changeTags = [] ) { - global $wgContLang; if ( $nt->exists() ) { $moveOverRedirect = true; $logType = 'move_redir'; @@ -520,8 +519,6 @@ class MovePage { if ( $reason ) { $comment .= wfMessage( 'colon-separator' )->inContentLanguage()->text() . $reason; } - # Truncate for whole multibyte characters. - $comment = $wgContLang->truncate( $comment, 255 ); $dbw = wfGetDB( DB_MASTER ); @@ -600,7 +597,12 @@ class MovePage { $redirectArticle->doEditUpdates( $redirectRevision, $user, [ 'created' => true ] ); - ChangeTags::addTags( $changeTags, null, $redirectRevId, null ); + // make a copy because of log entry below + $redirectTags = $changeTags; + if ( in_array( 'mw-new-redirect', ChangeTags::getSoftwareTags() ) ) { + $redirectTags[] = 'mw-new-redirect'; + } + ChangeTags::addTags( $redirectTags, null, $redirectRevId, null ); } }