r44083 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44082‎ | r44083 | r44084 >
Date:17:11, 30 November 2008
Author:aaron
Status:deferred
Tags:
Comment:
Delay message loading more
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticle.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php
@@ -194,12 +194,12 @@
195195 public function addStableLink() {
196196 global $wgRequest, $wgOut, $wgLang;
197197 if( $wgRequest->getVal('oldid') ) {
198 - wfLoadExtensionMessages( 'FlaggedRevs' );
199198 # We may have nav links like "direction=prev&oldid=x"
200199 $revID = $this->parent->getOldIDFromRequest();
201200 $frev = FlaggedRevision::newFromTitle( $this->parent->getTitle(), $revID );
202201 # Give a notice if this rev ID corresponds to a reviewed version...
203202 if( !is_null($frev) ) {
 203+ wfLoadExtensionMessages( 'FlaggedRevs' );
204204 $time = $wgLang->date( $frev->getTimestamp(), true );
205205 $flags = $frev->getTags();
206206 $quality = FlaggedRevs::isQuality( $flags );
@@ -515,12 +515,12 @@
516516 # NOTE: if not found, this will use the current
517517 $this->parent = new ImagePage( $this->parent->getTitle(), $time );
518518 }
519 - if ( !$time ) {
 519+ if( !$time ) {
520520 # Try request parameter
521521 $time = $wgRequest->getVal( 'filetimestamp', false );
522522 }
523523
524 - if ( !$time ) {
 524+ if( !$time ) {
525525 // Use the default behaviour
526526 return;
527527 }
@@ -528,7 +528,7 @@
529529 $title = $this->parent->getTitle();
530530 $displayFile = wfFindFile( $title, $time );
531531 # If none found, try current
532 - if ( !$displayFile ) {
 532+ if( !$displayFile ) {
533533 wfDebug( __METHOD__.": {$title->getPrefixedDBkey()}: $time not found, using current\n" );
534534 $displayFile = wfFindFile( $title );
535535 # If none found, use a valid local placeholder
@@ -1144,7 +1144,6 @@
11451145 global $wgUser, $wgOut;
11461146 // Is there a stable version?
11471147 if( $oldRev && $this->isReviewable() ) {
1148 - wfLoadExtensionMessages( 'FlaggedRevs' );
11491148 $frev = $this->getStableRev();
11501149 if( $frev && $frev->getRevId() == $oldRev->getID() && $newRev->isCurrent() ) {
11511150 $this->isDiffFromStable = true;
@@ -1154,6 +1153,7 @@
11551154 $article = new Article( $newRev->getTitle() );
11561155 # Is the stable revision using the same revision as the current?
11571156 if( $article->getLatest() != $frev->getRevId() ) {
 1157+ wfLoadExtensionMessages( 'FlaggedRevs' );
11581158 $patrol = '(' . $wgUser->getSkin()->makeKnownLinkObj( $newRev->getTitle(),
11591159 wfMsgHtml( 'review-diff2stable' ), "oldid={$frev->getRevId()}&diff=cur&diffonly=0" ) . ')';
11601160 $wgOut->addHTML( "<div class='fr-diff-to-stable' align='center'>$patrol</div>" );
@@ -1412,7 +1412,7 @@
14131413 # else collect all quality levels of a flag current user can set
14141414 } else {
14151415 foreach( $levels as $i => $name ) {
1416 - if ( !RevisionReview::userCan($quality, $i) ) {
 1416+ if( !RevisionReview::userCan($quality, $i) ) {
14171417 break;
14181418 }
14191419 $label[$i] = $name;

Status & tagging log