X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fpage%2FWikiPage.php;h=dd78d198529c4a7dd8c55a558ad105244d206dbb;hp=b72f7bd36f8b7970e1cf52caccde7635e2f338a4;hb=939199bcea28a3b13c49c0f808d11d415660b924;hpb=dba5cd4c7f0e098b3ad8ce1e39a0a506ccdfb746 diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index b72f7bd36f..dd78d19852 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -2485,13 +2485,13 @@ class WikiPage implements Page, IDBAccessObject { } if ( !$protect ) { // No protection at all means unprotection - $revCommentMsg = 'unprotectedarticle'; + $revCommentMsg = 'unprotectedarticle-comment'; $logAction = 'unprotect'; } elseif ( $isProtected ) { - $revCommentMsg = 'modifiedarticleprotection'; + $revCommentMsg = 'modifiedarticleprotection-comment'; $logAction = 'modify'; } else { - $revCommentMsg = 'protectedarticle'; + $revCommentMsg = 'protectedarticle-comment'; $logAction = 'protect'; } @@ -2675,16 +2675,14 @@ class WikiPage implements Page, IDBAccessObject { public function insertProtectNullRevision( $revCommentMsg, array $limit, array $expiry, $cascade, $reason, $user = null ) { - global $wgContLang; $dbw = wfGetDB( DB_MASTER ); // Prepare a null revision to be added to the history - $editComment = $wgContLang->ucfirst( - wfMessage( - $revCommentMsg, - $this->mTitle->getPrefixedText() - )->inContentLanguage()->text() - ); + $editComment = wfMessage( + $revCommentMsg, + $this->mTitle->getPrefixedText(), + $user ? $user->getName() : '' + )->inContentLanguage()->text(); if ( $reason ) { $editComment .= wfMessage( 'colon-separator' )->inContentLanguage()->text() . $reason; }