r24104 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24103‎ | r24104 | r24105 >
Date:04:03, 15 July 2007
Author:aaron
Status:old
Tags:
Comment:
*CSS tweak
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevsPage_body.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/flaggedrevs.css (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/flaggedrevs.css
@@ -3,8 +3,8 @@
44 background-color: #f0f8ff;
55 padding: 5px;
66 font-size: 80%;
7 - margin-left: 50px;
8 - margin-right: 50px;
 7+ margin-left: 5px;
 8+ margin-right: 5px;
99 text-align: center;
1010 }
1111
@@ -13,8 +13,8 @@
1414 background-color: #f0fff0;
1515 padding: 5px;
1616 font-size: 80%;
17 - margin-left: 50px;
18 - margin-right: 50px;
 17+ margin-left: 5px;
 18+ margin-right: 5px;
1919 text-align: center;
2020 }
2121
@@ -23,22 +23,22 @@
2424 background-color: #fffff0;
2525 padding: 5px;
2626 font-size: 80%;
27 - margin-left: 50px;
28 - margin-right: 50px;
 27+ margin-left: 5px;
 28+ margin-right: 5px;
2929 text-align: center;
3030 }
3131
32 -.flaggedrevs_notes {
 32+.flaggedrevs_notice {
3333 border: 1px solid #aaa;
3434 background-color: #f9f9f9;
3535 padding: 5px;
3636 font-size: 80%;
37 - margin-left: 50px;
38 - margin-right: 50px;
 37+ margin-left: 5px;
 38+ margin-right: 5px;
3939 text-align: center;
4040 }
4141
42 -.flaggedrevs_notice {
 42+.flaggedrevs_notes {
4343 border: 1px solid #aaa;
4444 background-color: #f9f9f9;
4545 padding: 5px;
Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage_body.php
@@ -168,7 +168,7 @@
169169 wfHidden( 'target', $this->page->getPrefixedText() ),
170170 wfHidden( 'oldid', $this->oldid ) );
171171
172 - $action = $wgTitle->escapeLocalUrl( 'action=submit' );
 172+ $action = $wgTitle->escapeLocalUrl( 'action=submit' );
173173 $form = "<form name='revisionreview' action='$action' method='post'>";
174174 $form .= '<fieldset><legend>' . wfMsgHtml( 'revreview-legend' ) . '</legend><table><tr>';
175175 // Dynamically contruct our review types
@@ -246,7 +246,7 @@
247247 $rev = Revision::newFromTitle( $this->page, $this->oldid );
248248 // Do not mess with archived/deleted revisions
249249 if ( is_null($rev) || $rev->mDeleted ) {
250 - $wgOut->showErrorPage( 'internalerror', 'revnotfoundtext' );
 250+ $wgOut->showErrorPage( 'internalerror', 'revnotfoundtext' );
251251 return;
252252 }
253253 } else {
@@ -500,7 +500,7 @@
501501 }
502502
503503 function execute( $par ) {
504 - global $wgRequest;
 504+ global $wgRequest, $wgUser;
505505
506506 $this->setHeaders();
507507 // Our target page
@@ -508,6 +508,8 @@
509509 // Revision ID
510510 $this->oldid = $wgRequest->getIntOrNull( 'oldid' );
511511
 512+ $this->skin = $wgUser->getSkin();
 513+
512514 if( $this->oldid ) {
513515 $this->showStableRevision( $wgRequest );
514516 } else if( $this->page ) {
@@ -587,8 +589,7 @@
588590
589591 function showStableList() {
590592 global $wgOut, $wgUser, $wgLang;
591 -
592 - $skin = $wgUser->getSkin();
 593+
593594 // Must be a valid page/Id
594595 $page = Title::newFromUrl( $this->page );
595596 if( is_null($page) || !$page->isContentPage() ) {
@@ -613,20 +614,16 @@
614615
615616 function formatRow( $row ) {
616617 global $wgLang, $wgUser;
617 -
618 - static $skin=null;
619 - if( is_null( $skin ) )
620 - $skin = $wgUser->getSkin();
621618
622619 $SV = SpecialPage::getTitleFor( 'Stableversions' );
623620 $time = $wgLang->timeanddate( wfTimestamp(TS_MW, $row->rev_timestamp), true );
624621 $ftime = $wgLang->timeanddate( wfTimestamp(TS_MW, $row->fr_timestamp), true );
625622 $review = wfMsg( 'stableversions-review', $ftime );
626623
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 );
629626
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>';
631628 }
632629 }
633630
@@ -687,8 +684,7 @@
688685
689686 function showList( $wgRequest ) {
690687 global $wgOut, $wgUser, $wgScript, $wgTitle;
691 -
692 - $skin = $wgUser->getSkin();
 688+
693689 $namespace = $wgRequest->getIntOrNull( 'namespace' );
694690 $nonquality = $wgRequest->getVal( 'includenonquality' );
695691

Status & tagging log