r45857 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45856‎ | r45857 | r45858 >
Date:00:01, 18 January 2009
Author:aaron
Status:ok (Comments)
Tags:
Comment:
(bug 16957) Add show/hide to Preferences for option on Special:NewPages
Modified paths:
  • /trunk/phase3/includes/User.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialNewpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialPreferences.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -491,6 +491,7 @@
492492 'tog-justify' => 'Justify paragraphs',
493493 'tog-hideminor' => 'Hide minor edits in recent changes',
494494 'tog-hidepatrolled' => 'Hide patrolled edits in recent changes',
 495+'tog-newpageshidepatrolled' => 'Hide patrolled pages from new page list',
495496 'tog-extendwatchlist' => 'Expand watchlist to show all applicable changes',
496497 'tog-usenewrc' => 'Enhanced recent changes (JavaScript)',
497498 'tog-numberheadings' => 'Auto-number headings',
Index: trunk/phase3/includes/specials/SpecialPreferences.php
@@ -1093,10 +1093,11 @@
10941094 );
10951095
10961096 $toggles[] = 'hideminor';
1097 - if( $wgUseRCPatrol )
 1097+ if( $wgUseRCPatrol ) {
10981098 $toggles[] = 'hidepatrolled';
1099 - if( $wgRCShowWatchingUsers )
1100 - $toggles[] = 'shownumberswatching';
 1099+ $toggles[] = 'newpageshidepatrolled';
 1100+ }
 1101+ if( $wgRCShowWatchingUsers ) $toggles[] = 'shownumberswatching';
11011102 $toggles[] = 'usenewrc';
11021103
11031104 $wgOut->addHTML(
@@ -1106,10 +1107,8 @@
11071108
11081109 # Watchlist
11091110 $watchlistToggles = array( 'watchlisthideminor', 'watchlisthidebots', 'watchlisthideown',
1110 - 'watchlisthideanons', 'watchlisthideliu' );
1111 - if( $wgUseRCPatrol ) {
1112 - $watchlistToggles[] = 'watchlisthidepatrolled';
1113 - }
 1111+ 'watchlisthideanons', 'watchlisthideliu' );
 1112+ if( $wgUseRCPatrol ) $watchlistToggles[] = 'watchlisthidepatrolled';
11141113
11151114 $wgOut->addHTML(
11161115 Xml::fieldset( wfMsg( 'prefs-watchlist' ) ) .
Index: trunk/phase3/includes/specials/SpecialNewpages.php
@@ -24,7 +24,7 @@
2525 $opts = new FormOptions();
2626 $this->opts = $opts; // bind
2727 $opts->add( 'hideliu', false );
28 - $opts->add( 'hidepatrolled', false );
 28+ $opts->add( 'hidepatrolled', $wgUser->getBoolOption( 'newpageshidepatrolled' ) );
2929 $opts->add( 'hidebots', false );
3030 $opts->add( 'hideredirs', true );
3131 $opts->add( 'limit', (int)$wgUser->getOption( 'rclimit' ) );
Index: trunk/phase3/includes/User.php
@@ -1020,6 +1020,7 @@
10211021 wfRunHooks( 'UserToggles', array( &$extraToggles ) );
10221022 if( $wgUseRCPatrol ) {
10231023 $extraToggles[] = 'hidepatrolled';
 1024+ $extraToggles[] = 'newpageshidepatrolled';
10241025 $extraToggles[] = 'watchlisthidepatrolled';
10251026 }
10261027 return array_merge( self::$mToggles, $extraToggles, $wgContLang->getExtraUserToggles() );

Follow-up revisions

RevisionCommit summaryAuthorDate
r45858Fix omission in r45857siebrand00:03, 18 January 2009
r45953Follow up r45698 and r45857: Add new options to $wgDefaultUserOptionsraymond08:02, 21 January 2009
r49646(bug 7039) Show/hide bots/own edits from Recentchanges via preferences...purodha18:43, 19 April 2009

Comments

#Comment by Raymond (talk | contribs)   08:04, 21 January 2009

Follow-up in r45953: New option added to $wgDefaultUserOptions

Status & tagging log