Index: trunk/extensions/ApprovedRevs/ApprovedRevs.i18n.php |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | 'approvedrevs-revisionnumber' => 'revision $1', |
40 | 40 | 'approvedrevs-approvedby' => 'approved by $1 on $2', |
41 | 41 | 'approvedrevs-difffromlatest' => 'diff from latest', |
42 | | - 'approvedrevs-viewlatest' => 'view latest', |
| 42 | + 'approvedrevs-viewlatest' => 'View latest', |
43 | 43 | 'approvedrevs-approvelatest' => 'approve latest', |
44 | 44 | 'approvedrevs-approvethisrev' => 'Approve this revision', |
45 | 45 | 'approvedrevs-viewlatestrev' => 'View the latest revision', |
Index: trunk/extensions/ApprovedRevs/ApprovedRevs.hooks.php |
— | — | @@ -200,29 +200,32 @@ |
201 | 201 | wfMsg( 'approvedrevs-approvedandlatest' ) |
202 | 202 | ); |
203 | 203 | } else { |
204 | | - $text = wfMsg( 'approvedrevs-notlatest' ); |
| 204 | + $text = wfMsgHtml( 'approvedrevs-notlatest' ); |
| 205 | + |
205 | 206 | global $wgUser; |
206 | 207 | $sk = $wgUser->getSkin(); |
207 | | - $curRevLink = $sk->link( |
| 208 | + $text .= ' ' . $sk->link( |
208 | 209 | $article->getTitle(), |
209 | 210 | wfMsgHtml( 'approvedrevs-viewlatest' ), |
210 | 211 | array(), |
211 | 212 | array( 'oldid' => $article->getLatest() ), |
212 | 213 | array( 'known', 'noclasses' ) |
213 | 214 | ); |
214 | | - $text .= ' ' . $curRevLink; |
| 215 | + |
215 | 216 | $text = Xml::tags( |
216 | 217 | 'span', |
217 | 218 | array( 'class' => 'notLatestMsg' ), |
218 | 219 | $text |
219 | 220 | ); |
220 | 221 | } |
| 222 | + |
221 | 223 | global $wgOut; |
222 | 224 | if ( $wgOut->getSubtitle() != '' ) { |
223 | | - $wgOut->appendSubtitle( "<br />" . $text ); |
| 225 | + $wgOut->appendSubtitle( '<br />' . $text ); |
224 | 226 | } else { |
225 | 227 | $wgOut->setSubtitle( $text ); |
226 | 228 | } |
| 229 | + |
227 | 230 | return false; |
228 | 231 | } |
229 | 232 | |
— | — | @@ -558,15 +561,18 @@ |
559 | 562 | && $article->getTitle()->userCan( 'approverevisions' ) ) { |
560 | 563 | |
561 | 564 | $approvedId = ApprovedRevs::getApprovedRevID( $article->getTitle() ); |
562 | | - |
563 | | - if ( empty( $approvedId ) || $approvedId != $article->getRevIdFetched() ) { |
| 565 | + $thisRevId = $wgRequest->getCheck( 'oldid' ) ? $wgRequest->getInt( 'oldid' ) : $article->getRevIdFetched(); |
| 566 | + |
| 567 | + if ( empty( $approvedId ) || $approvedId != $thisRevId ) { |
| 568 | + $wgOut->addHTML( '<span style="margin-left:10.75px">' ); |
| 569 | + |
564 | 570 | if ( $egApprovedRevsBlankIfUnapproved && !$wgRequest->getCheck( 'oldid' ) ) { |
565 | 571 | $wgOut->addHTML( |
566 | 572 | htmlspecialchars( wfMsg( 'approvedrevs-noapprovedrevs' ) ) . ' ' . |
567 | 573 | Xml::element( 'a', |
568 | 574 | array( 'href' => $article->getTitle()->getLocalUrl( |
569 | 575 | array( |
570 | | - 'oldid' => $article->getRevIdFetched() |
| 576 | + 'oldid' => $thisRevId |
571 | 577 | ) |
572 | 578 | ) ), |
573 | 579 | wfMsg( 'approvedrevs-viewlatestrev' ) |
— | — | @@ -578,12 +584,14 @@ |
579 | 585 | array( 'href' => $article->getTitle()->getLocalUrl( |
580 | 586 | array( |
581 | 587 | 'action' => 'approve', |
582 | | - 'oldid' => $article->getRevIdFetched() |
| 588 | + 'oldid' => $thisRevId |
583 | 589 | ) |
584 | 590 | ) ), |
585 | 591 | wfMsg( 'approvedrevs-approvethisrev' ) |
586 | 592 | ) . '</b>' ); |
587 | 593 | } |
| 594 | + |
| 595 | + $wgOut->addHTML( '</span>' ); |
588 | 596 | } |
589 | 597 | } |
590 | 598 | |