r45757 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45756‎ | r45757 | r45758 >
Date:22:31, 14 January 2009
Author:brion
Status:ok (Comments)
Tags:
Comment:
Follow-up to r45698 "(bug 16969) Add show/hide to Preferences for option on specialpages added by FlaggedRevs"
That also added toggles in core for showing/hiding patrolled edits by default in watchlist & RC, but they were being shown regardless of whether patrolling was enabled.
Now hiding them if patrolling is disabled.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialPreferences.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialPreferences.php
@@ -1067,7 +1067,7 @@
10681068 $wgOut->addHTML( Xml::closeElement( 'fieldset' ) );
10691069
10701070 # Recent changes
1071 - global $wgRCMaxAge;
 1071+ global $wgRCMaxAge, $wgUseRCPatrol;
10721072 $wgOut->addHTML(
10731073 Xml::fieldset( wfMsg( 'prefs-rc' ) ) .
10741074 Xml::openElement( 'table' ) .
@@ -1093,7 +1093,8 @@
10941094 );
10951095
10961096 $toggles[] = 'hideminor';
1097 - $toggles[] = 'hidepatrolled';
 1097+ if( $wgUseRCPatrol )
 1098+ $toggles[] = 'hidepatrolled';
10981099 if( $wgRCShowWatchingUsers )
10991100 $toggles[] = 'shownumberswatching';
11001101 $toggles[] = 'usenewrc';
@@ -1104,6 +1105,12 @@
11051106 );
11061107
11071108 # Watchlist
 1109+ $watchlistToggles = array( 'watchlisthideminor', 'watchlisthidebots', 'watchlisthideown',
 1110+ 'watchlisthideanons', 'watchlisthideliu' );
 1111+ if( $wgUseRCPatrol ) {
 1112+ $watchlistToggles[] = 'watchlisthidepatrolled';
 1113+ }
 1114+
11081115 $wgOut->addHTML(
11091116 Xml::fieldset( wfMsg( 'prefs-watchlist' ) ) .
11101117 Xml::inputLabel( wfMsg( 'prefs-watchlist-days' ), 'wpWatchlistDays', 'wpWatchlistDays', 3, $this->mWatchlistDays ) . ' ' .
@@ -1113,8 +1120,7 @@
11141121 Xml::inputLabel( wfMsg( 'prefs-watchlist-edits' ), 'wpWatchlistEdits', 'wpWatchlistEdits', 3, $this->mWatchlistEdits ) . ' ' .
11151122 wfMsgHTML( 'prefs-watchlist-edits-max' ) .
11161123 '<br /><br />' .
1117 - $this->getToggles( array( 'watchlisthideminor', 'watchlisthidebots', 'watchlisthideown',
1118 - 'watchlisthideanons', 'watchlisthideliu', 'watchlisthidepatrolled' ) )
 1124+ $this->getToggles( $watchlistToggles )
11191125 );
11201126
11211127 if( $wgUser->isAllowed( 'createpage' ) || $wgUser->isAllowed( 'createtalk' ) ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r45698(bug 16969) Add show/hide to Preferences for option on specialpages added by ...aaron13:46, 13 January 2009

Comments

#Comment by Aaron Schulz (talk | contribs)   22:36, 14 January 2009

Thought I did that already, bah

Status & tagging log