r57736 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57735‎ | r57736 | r57737 >
Date:02:53, 15 October 2009
Author:aaron
Status:ok
Tags:
Comment:
Fix configuration link if protect UI is used
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/specialpages/StablePages_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -57,6 +57,7 @@
5858 self::$minSL[$tag] = 1;
5959 }
6060 global $wgFlaggedRevsProtectLevels;
 61+ $wgFlaggedRevsProtectLevels = (array)$wgFlaggedRevsProtectLevels;
6162 foreach( $wgFlaggedRevsProtectLevels as $level => &$config ) {
6263 # Sanity checks
6364 if( !isset($config['select']) || !isset($config['override']) || !isset($config['autoreview']) ) {
Index: trunk/extensions/FlaggedRevs/specialpages/StablePages_body.php
@@ -62,8 +62,13 @@
6363 $link = $this->skin->makeKnownLinkObj( $title, $title->getPrefixedText() );
6464
6565 $stitle = SpecialPage::getTitleFor( 'Stabilization' );
66 - $config = $this->skin->makeKnownLinkObj( $stitle, wfMsgHtml('stablepages-config'),
67 - 'page=' . $title->getPrefixedUrl() );
 66+ if( count( FlaggedRevs::getProtectionLevels() ) ) {
 67+ $config = $this->skin->makeKnownLinkObj( $title, wfMsgHtml('stablepages-config'),
 68+ 'action=protect' );
 69+ } else {
 70+ $config = $this->skin->makeKnownLinkObj( $stitle, wfMsgHtml('stablepages-config'),
 71+ 'page=' . $title->getPrefixedUrl() );
 72+ }
6873 $stable = $this->skin->makeKnownLinkObj( $title, wfMsgHtml('stablepages-stable'), 'stable=1' );
6974
7075 if( intval($row->fpc_select) === FLAGGED_VIS_PRISTINE ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r57737merge r57735, r57736 fixesaaron03:00, 15 October 2009

Status & tagging log