Index: trunk/extensions/FlaggedRevs/flaggedrevs.css |
— | — | @@ -3,8 +3,8 @@ |
4 | 4 | background-color: #f0f8ff; |
5 | 5 | padding: 5px; |
6 | 6 | font-size: 80%; |
7 | | - margin-left: 50px; |
8 | | - margin-right: 50px; |
| 7 | + margin-left: 5px; |
| 8 | + margin-right: 5px; |
9 | 9 | text-align: center; |
10 | 10 | } |
11 | 11 | |
— | — | @@ -13,8 +13,8 @@ |
14 | 14 | background-color: #f0fff0; |
15 | 15 | padding: 5px; |
16 | 16 | font-size: 80%; |
17 | | - margin-left: 50px; |
18 | | - margin-right: 50px; |
| 17 | + margin-left: 5px; |
| 18 | + margin-right: 5px; |
19 | 19 | text-align: center; |
20 | 20 | } |
21 | 21 | |
— | — | @@ -23,22 +23,22 @@ |
24 | 24 | background-color: #fffff0; |
25 | 25 | padding: 5px; |
26 | 26 | font-size: 80%; |
27 | | - margin-left: 50px; |
28 | | - margin-right: 50px; |
| 27 | + margin-left: 5px; |
| 28 | + margin-right: 5px; |
29 | 29 | text-align: center; |
30 | 30 | } |
31 | 31 | |
32 | | -.flaggedrevs_notes { |
| 32 | +.flaggedrevs_notice { |
33 | 33 | border: 1px solid #aaa; |
34 | 34 | background-color: #f9f9f9; |
35 | 35 | padding: 5px; |
36 | 36 | font-size: 80%; |
37 | | - margin-left: 50px; |
38 | | - margin-right: 50px; |
| 37 | + margin-left: 5px; |
| 38 | + margin-right: 5px; |
39 | 39 | text-align: center; |
40 | 40 | } |
41 | 41 | |
42 | | -.flaggedrevs_notice { |
| 42 | +.flaggedrevs_notes { |
43 | 43 | border: 1px solid #aaa; |
44 | 44 | background-color: #f9f9f9; |
45 | 45 | padding: 5px; |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage_body.php |
— | — | @@ -168,7 +168,7 @@ |
169 | 169 | wfHidden( 'target', $this->page->getPrefixedText() ), |
170 | 170 | wfHidden( 'oldid', $this->oldid ) ); |
171 | 171 | |
172 | | - $action = $wgTitle->escapeLocalUrl( 'action=submit' ); |
| 172 | + $action = $wgTitle->escapeLocalUrl( 'action=submit' ); |
173 | 173 | $form = "<form name='revisionreview' action='$action' method='post'>"; |
174 | 174 | $form .= '<fieldset><legend>' . wfMsgHtml( 'revreview-legend' ) . '</legend><table><tr>'; |
175 | 175 | // Dynamically contruct our review types |
— | — | @@ -246,7 +246,7 @@ |
247 | 247 | $rev = Revision::newFromTitle( $this->page, $this->oldid ); |
248 | 248 | // Do not mess with archived/deleted revisions |
249 | 249 | if ( is_null($rev) || $rev->mDeleted ) { |
250 | | - $wgOut->showErrorPage( 'internalerror', 'revnotfoundtext' ); |
| 250 | + $wgOut->showErrorPage( 'internalerror', 'revnotfoundtext' ); |
251 | 251 | return; |
252 | 252 | } |
253 | 253 | } else { |
— | — | @@ -500,7 +500,7 @@ |
501 | 501 | } |
502 | 502 | |
503 | 503 | function execute( $par ) { |
504 | | - global $wgRequest; |
| 504 | + global $wgRequest, $wgUser; |
505 | 505 | |
506 | 506 | $this->setHeaders(); |
507 | 507 | // Our target page |
— | — | @@ -508,6 +508,8 @@ |
509 | 509 | // Revision ID |
510 | 510 | $this->oldid = $wgRequest->getIntOrNull( 'oldid' ); |
511 | 511 | |
| 512 | + $this->skin = $wgUser->getSkin(); |
| 513 | + |
512 | 514 | if( $this->oldid ) { |
513 | 515 | $this->showStableRevision( $wgRequest ); |
514 | 516 | } else if( $this->page ) { |
— | — | @@ -587,8 +589,7 @@ |
588 | 590 | |
589 | 591 | function showStableList() { |
590 | 592 | global $wgOut, $wgUser, $wgLang; |
591 | | - |
592 | | - $skin = $wgUser->getSkin(); |
| 593 | + |
593 | 594 | // Must be a valid page/Id |
594 | 595 | $page = Title::newFromUrl( $this->page ); |
595 | 596 | if( is_null($page) || !$page->isContentPage() ) { |
— | — | @@ -613,20 +614,16 @@ |
614 | 615 | |
615 | 616 | function formatRow( $row ) { |
616 | 617 | global $wgLang, $wgUser; |
617 | | - |
618 | | - static $skin=null; |
619 | | - if( is_null( $skin ) ) |
620 | | - $skin = $wgUser->getSkin(); |
621 | 618 | |
622 | 619 | $SV = SpecialPage::getTitleFor( 'Stableversions' ); |
623 | 620 | $time = $wgLang->timeanddate( wfTimestamp(TS_MW, $row->rev_timestamp), true ); |
624 | 621 | $ftime = $wgLang->timeanddate( wfTimestamp(TS_MW, $row->fr_timestamp), true ); |
625 | 622 | $review = wfMsg( 'stableversions-review', $ftime ); |
626 | 623 | |
627 | | - $lev = wfMsg('hist-stable'); |
628 | | - if( $row->fr_quality >=1 ) $lev = wfMsg('hist-quality'); |
| 624 | + $lev = ( $row->fr_quality >=1 ) ? wfMsg('hist-quality') : wfMsg('hist-stable'); |
| 625 | + $link = $this->skin->makeKnownLinkObj( $SV, $time, 'oldid='.$row->fr_rev_id ); |
629 | 626 | |
630 | | - return '<li>'.$skin->makeKnownLinkObj( $SV, $time, 'oldid='.$row->fr_rev_id ).' ('.$review.') <b>'.$lev.'</b></li>'; |
| 627 | + return '<li>'.$link.' ('.$review.') <strong>'.$lev.'</strong></li>'; |
631 | 628 | } |
632 | 629 | } |
633 | 630 | |
— | — | @@ -687,8 +684,7 @@ |
688 | 685 | |
689 | 686 | function showList( $wgRequest ) { |
690 | 687 | global $wgOut, $wgUser, $wgScript, $wgTitle; |
691 | | - |
692 | | - $skin = $wgUser->getSkin(); |
| 688 | + |
693 | 689 | $namespace = $wgRequest->getIntOrNull( 'namespace' ); |
694 | 690 | $nonquality = $wgRequest->getVal( 'includenonquality' ); |
695 | 691 | |