X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FMovePage.php;h=fc9f6a6676614227ffe2c87c5f6521bf63641f24;hp=2f8255ba388e3f9dfbdbbec95acf1d355e6daa19;hb=f4ec592330517bc80e2ee351d0385e752f16e3fb;hpb=c66360d167aeacec8ec296ae8ff29fd5d3f1a557 diff --git a/includes/MovePage.php b/includes/MovePage.php index 2f8255ba38..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' @@ -597,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 ); } }