X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdiff%2FDifferenceEngine.php;h=ac29ae02380169b99f904975cf6cec83390d28a8;hb=9f5b6f5aeb292df1651666a6558e2ff1c74c565d;hp=de8dd43bcaa6bc92d33996c7ffaefb016844daad;hpb=7308c4d8de265fb0e176516e37e386a6c4f99c06;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index de8dd43bca..ac29ae0238 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -714,7 +714,7 @@ class DifferenceEngine extends ContextSource { if ( !$this->mRefreshCache ) { $difftext = $wgMemc->get( $key ); if ( $difftext ) { - wfIncrStats( 'diff_cache_hit' ); + wfIncrStats( 'diff_cache.hit' ); $difftext = $this->localiseLineNumbers( $difftext ); $difftext .= "\n\n"; @@ -734,12 +734,12 @@ class DifferenceEngine extends ContextSource { // Save to cache for 7 days if ( !Hooks::run( 'AbortDiffCache', array( &$this ) ) ) { - wfIncrStats( 'diff_uncacheable' ); + wfIncrStats( 'diff_cache.uncacheable' ); } elseif ( $key !== false && $difftext !== false ) { - wfIncrStats( 'diff_cache_miss' ); + wfIncrStats( 'diff_cache.miss' ); $wgMemc->set( $key, $difftext, 7 * 86400 ); } else { - wfIncrStats( 'diff_uncacheable' ); + wfIncrStats( 'diff_cache.uncacheable' ); } // Replace line numbers with the text in the user's language if ( $difftext !== false ) { @@ -1040,7 +1040,7 @@ class DifferenceEngine extends ContextSource { $key = $title->quickUserCan( 'edit', $user ) ? 'editold' : 'viewsourceold'; $msg = $this->msg( $key )->escaped(); $editLink = $this->msg( 'parentheses' )->rawParams( - Linker::linkKnown( $title, $msg, array( ), $editQuery ) )->escaped(); + Linker::linkKnown( $title, $msg, array(), $editQuery ) )->escaped(); $header .= ' ' . Html::rawElement( 'span', array( 'class' => 'mw-diff-edit' ), @@ -1077,10 +1077,11 @@ class DifferenceEngine extends ContextSource { // is often in a different language, mostly the page content language/dir $tableClass = 'diff diff-contentalign-' . htmlspecialchars( $this->getDiffLang()->alignStart() ); $header = ""; + $userLang = htmlspecialchars( $this->getLanguage()->getHtmlCode() ); if ( !$diff && !$otitle ) { $header .= " - + "; $multiColspan = 1; @@ -1099,7 +1100,7 @@ class DifferenceEngine extends ContextSource { } if ( $otitle || $ntitle ) { $header .= " - + "; @@ -1108,10 +1109,11 @@ class DifferenceEngine extends ContextSource { if ( $multi != '' ) { $header .= ""; + "class='diff-multi' lang='{$userLang}'>{$multi}"; } if ( $notice != '' ) { - $header .= ""; + $header .= ""; } return $header . $diff . "
{$ntitle}
{$otitle} {$ntitle}
{$multi}
{$notice}
{$notice}
"; @@ -1233,12 +1235,6 @@ class DifferenceEngine extends ContextSource { // Load the new revision object if ( $this->mNewid ) { $this->mNewRev = Revision::newFromId( $this->mNewid ); - - if ( !$this->mNewRev && wfGetLB()->getServerCount() > 1 ) { - // Try harder… This is being hit after a rollback where we show the - // diff immediately after the edit happened. T93866 - $this->mNewRev = Revision::newFromId( $this->mNewid, Revision::READ_LATEST ); - } } else { $this->mNewRev = Revision::newFromTitle( $this->getTitle(),