r63950 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63949‎ | r63950 | r63951 >
Date:16:01, 19 March 2010
Author:aaron
Status:ok
Tags:
Comment:
Cleaned up stablepages precedence display
Modified paths:
  • /trunk/extensions/FlaggedRevs/specialpages/StablePages_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/specialpages/StablePages_body.php
@@ -68,26 +68,28 @@
6969 $title = Title::makeTitle( $row->page_namespace, $row->page_title );
7070 $link = $this->skin->makeKnownLinkObj( $title, $title->getPrefixedText() );
7171
72 - $stitle = SpecialPage::getTitleFor( 'Stabilization' );
7372 if ( FlaggedRevs::useProtectionLevels() ) {
74 - $config = $this->skin->makeKnownLinkObj( $title, wfMsgHtml( 'stablepages-config' ),
75 - 'action=protect' );
 73+ $config = $this->skin->makeKnownLinkObj( $title,
 74+ wfMsgHtml( 'stablepages-config' ), 'action=protect' );
7675 } else {
77 - $config = $this->skin->makeKnownLinkObj( $stitle, wfMsgHtml( 'stablepages-config' ),
 76+ $config = $this->skin->makeKnownLinkObj(
 77+ SpecialPage::getTitleFor( 'Stabilization' ),
 78+ wfMsgHtml( 'stablepages-config' ),
7879 'page=' . $title->getPrefixedUrl() );
7980 }
8081
8182 $type = '';
8283 // Show precedence if there are several possible levels
8384 if ( FlaggedRevs::qualityVersions() ) {
84 - if ( intval( $row->fpc_select ) === FLAGGED_VIS_PRISTINE ) {
 85+ $select = intval( $row->fpc_select );
 86+ if ( $select === FLAGGED_VIS_PRISTINE ) {
8587 $type = wfMsgHtml( 'stablepages-prec-pristine' );
86 - } elseif ( intval( $row->fpc_select ) === FLAGGED_VIS_QUALITY ) {
 88+ } elseif ( $select === FLAGGED_VIS_QUALITY ) {
8789 $type = wfMsgHtml( 'stablepages-prec-quality' );
88 - } else {
 90+ } elseif( $select === FLAGGED_VIS_LATEST ) {
8991 $type = wfMsgHtml( 'stablepages-prec-none' );
9092 }
91 - $type = "(<b>{$type}</b>)";
 93+ if( $type ) $type = "(<b>{$type}</b>)";
9294 }
9395
9496 $restr = '';

Status & tagging log