Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php |
— | — | @@ -194,12 +194,12 @@ |
195 | 195 | public function addStableLink() { |
196 | 196 | global $wgRequest, $wgOut, $wgLang; |
197 | 197 | if( $wgRequest->getVal('oldid') ) { |
198 | | - wfLoadExtensionMessages( 'FlaggedRevs' ); |
199 | 198 | # We may have nav links like "direction=prev&oldid=x" |
200 | 199 | $revID = $this->parent->getOldIDFromRequest(); |
201 | 200 | $frev = FlaggedRevision::newFromTitle( $this->parent->getTitle(), $revID ); |
202 | 201 | # Give a notice if this rev ID corresponds to a reviewed version... |
203 | 202 | if( !is_null($frev) ) { |
| 203 | + wfLoadExtensionMessages( 'FlaggedRevs' ); |
204 | 204 | $time = $wgLang->date( $frev->getTimestamp(), true ); |
205 | 205 | $flags = $frev->getTags(); |
206 | 206 | $quality = FlaggedRevs::isQuality( $flags ); |
— | — | @@ -515,12 +515,12 @@ |
516 | 516 | # NOTE: if not found, this will use the current |
517 | 517 | $this->parent = new ImagePage( $this->parent->getTitle(), $time ); |
518 | 518 | } |
519 | | - if ( !$time ) { |
| 519 | + if( !$time ) { |
520 | 520 | # Try request parameter |
521 | 521 | $time = $wgRequest->getVal( 'filetimestamp', false ); |
522 | 522 | } |
523 | 523 | |
524 | | - if ( !$time ) { |
| 524 | + if( !$time ) { |
525 | 525 | // Use the default behaviour |
526 | 526 | return; |
527 | 527 | } |
— | — | @@ -528,7 +528,7 @@ |
529 | 529 | $title = $this->parent->getTitle(); |
530 | 530 | $displayFile = wfFindFile( $title, $time ); |
531 | 531 | # If none found, try current |
532 | | - if ( !$displayFile ) { |
| 532 | + if( !$displayFile ) { |
533 | 533 | wfDebug( __METHOD__.": {$title->getPrefixedDBkey()}: $time not found, using current\n" ); |
534 | 534 | $displayFile = wfFindFile( $title ); |
535 | 535 | # If none found, use a valid local placeholder |
— | — | @@ -1144,7 +1144,6 @@ |
1145 | 1145 | global $wgUser, $wgOut; |
1146 | 1146 | // Is there a stable version? |
1147 | 1147 | if( $oldRev && $this->isReviewable() ) { |
1148 | | - wfLoadExtensionMessages( 'FlaggedRevs' ); |
1149 | 1148 | $frev = $this->getStableRev(); |
1150 | 1149 | if( $frev && $frev->getRevId() == $oldRev->getID() && $newRev->isCurrent() ) { |
1151 | 1150 | $this->isDiffFromStable = true; |
— | — | @@ -1154,6 +1153,7 @@ |
1155 | 1154 | $article = new Article( $newRev->getTitle() ); |
1156 | 1155 | # Is the stable revision using the same revision as the current? |
1157 | 1156 | if( $article->getLatest() != $frev->getRevId() ) { |
| 1157 | + wfLoadExtensionMessages( 'FlaggedRevs' ); |
1158 | 1158 | $patrol = '(' . $wgUser->getSkin()->makeKnownLinkObj( $newRev->getTitle(), |
1159 | 1159 | wfMsgHtml( 'review-diff2stable' ), "oldid={$frev->getRevId()}&diff=cur&diffonly=0" ) . ')'; |
1160 | 1160 | $wgOut->addHTML( "<div class='fr-diff-to-stable' align='center'>$patrol</div>" ); |
— | — | @@ -1412,7 +1412,7 @@ |
1413 | 1413 | # else collect all quality levels of a flag current user can set |
1414 | 1414 | } else { |
1415 | 1415 | foreach( $levels as $i => $name ) { |
1416 | | - if ( !RevisionReview::userCan($quality, $i) ) { |
| 1416 | + if( !RevisionReview::userCan($quality, $i) ) { |
1417 | 1417 | break; |
1418 | 1418 | } |
1419 | 1419 | $label[$i] = $name; |