r49651 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49650‎ | r49651 | r49652 >
Date:21:03, 19 April 2009
Author:demon
Status:ok
Tags:
Comment:
Reverting r49646 (and followups r49647 r49650) per comments on code review:
* Could possibly be 1 pref instead of two to reduce clutter
* A pref for NewPages doesn't belong with prefs for RecentChanges
* This should definitely wait for the preference branch to be merged
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /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/includes/specials/SpecialRecentchanges.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesDe.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -16,12 +16,8 @@
1717 'tog-highlightbroken',
1818 'tog-justify',
1919 'tog-hideminor',
20 - 'tog-rc_hidebots',
21 - 'tog-newpageshidebots',
2220 'tog-hidepatrolled',
2321 'tog-newpageshidepatrolled',
24 - 'tog-rc_hideown',
25 - 'tog-newpageshideown',
2622 'tog-extendwatchlist',
2723 'tog-usenewrc',
2824 'tog-numberheadings',
Index: trunk/phase3/includes/User.php
@@ -53,10 +53,6 @@
5454 'highlightbroken',
5555 'justify',
5656 'hideminor',
57 - 'rc_hidebots',
58 - 'rc_hideown',
59 - 'newpageshidebots',
60 - 'newpageshideown',
6157 'extendwatchlist',
6258 'usenewrc',
6359 'numberheadings',
Index: trunk/phase3/includes/DefaultSettings.php
@@ -2444,7 +2444,6 @@
24452445 'rclimit' => 50,
24462446 'wllimit' => 250,
24472447 'hideminor' => 0,
2448 - 'rc_hidebots' => 1,
24492448 'hidepatrolled' => 0,
24502449 'newpageshidepatrolled' => 0,
24512450 'highlightbroken' => 1,
Index: trunk/phase3/includes/specials/SpecialNewpages.php
@@ -25,8 +25,7 @@
2626 $this->opts = $opts; // bind
2727 $opts->add( 'hideliu', false );
2828 $opts->add( 'hidepatrolled', $wgUser->getBoolOption( 'newpageshidepatrolled' ) );
29 - $opts->add( 'hidebots', $wgUser->getBoolOption( 'newpageshidebots' ) );
30 - $opts->add( 'hideown', $wgUser->getBoolOption( 'newpageshideown' ) );
 29+ $opts->add( 'hidebots', false );
3130 $opts->add( 'hideredirs', true );
3231 $opts->add( 'limit', (int)$wgUser->getOption( 'rclimit' ) );
3332 $opts->add( 'offset', '' );
@@ -61,8 +60,6 @@
6261 $this->opts->setValue( 'hidepatrolled', true );
6362 if ( 'hidebots' == $bit )
6463 $this->opts->setValue( 'hidebots', true );
65 - if ( 'hideown' == $bit )
66 - $this->opts->setValue( 'hideown', true );
6764 if ( 'showredirs' == $bit )
6865 $this->opts->setValue( 'hideredirs', false );
6966 if ( is_numeric( $bit ) )
@@ -135,7 +132,6 @@
136133 'hideliu' => 'rcshowhideliu',
137134 'hidepatrolled' => 'rcshowhidepatr',
138135 'hidebots' => 'rcshowhidebots',
139 - 'hideown' => 'rcshowhidemine',
140136 'hideredirs' => 'whatlinkshere-hideredirs'
141137 );
142138
@@ -391,7 +387,6 @@
392388
393389 function getQueryInfo() {
394390 global $wgEnableNewpagesUserFilter, $wgGroupPermissions, $wgUser;
395 - $dbr = wfGetDB( DB_SLAVE );
396391 $conds = array();
397392 $conds['rc_new'] = 1;
398393
@@ -423,13 +418,7 @@
424419 if( $this->opts->getValue( 'hidebots' ) ) {
425420 $conds['rc_bot'] = 0;
426421 }
427 - if( $this->opts->getValue( 'hideown' ) ) {
428 - if( $wgUser->getId() ) {
429 - $conds[] = 'rc_user != ' . $dbr->addQuotes( $wgUser->getId() );
430 - } else {
431 - $conds[] = 'rc_user_text != ' . $dbr->addQuotes( $wgUser->getName() );
432 - }
433 - }
 422+
434423 if ( $this->opts->getValue( 'hideredirs' ) ) {
435424 $conds['page_is_redirect'] = 0;
436425 }
Index: trunk/phase3/includes/specials/SpecialPreferences.php
@@ -1162,14 +1162,10 @@
11631163 );
11641164
11651165 $toggles[] = 'hideminor';
1166 - $toggles[] = 'rc_hidebots';
1167 - $toggles[] = 'newpageshidebots';
11681166 if( $wgUseRCPatrol ) {
11691167 $toggles[] = 'hidepatrolled';
11701168 $toggles[] = 'newpageshidepatrolled';
11711169 }
1172 - $toggles[] = 'rc_hideown';
1173 - $toggles[] = 'newpageshideown';
11741170 if( $wgRCShowWatchingUsers ) $toggles[] = 'shownumberswatching';
11751171 $toggles[] = 'usenewrc';
11761172
Index: trunk/phase3/includes/specials/SpecialRecentchanges.php
@@ -24,11 +24,11 @@
2525 $opts->add( 'from', '' );
2626
2727 $opts->add( 'hideminor', $wgUser->getBoolOption( 'hideminor' ) );
28 - $opts->add( 'hidebots', $wgUser->getBoolOption( 'rc_hidebots' ) );
 28+ $opts->add( 'hidebots', true );
2929 $opts->add( 'hideanons', false );
3030 $opts->add( 'hideliu', false );
3131 $opts->add( 'hidepatrolled', $wgUser->getBoolOption( 'hidepatrolled' ) );
32 - $opts->add( 'hidemyself', $wgUser->getBoolOption( 'rc_hideown' ) );
 32+ $opts->add( 'hidemyself', false );
3333
3434 $opts->add( 'namespace', '', FormOptions::INTNULL );
3535 $opts->add( 'invert', false );
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -499,12 +499,8 @@
500500 'tog-highlightbroken' => 'Format broken links <a href="" class="new">like this</a> (alternative: like this<a href="" class="internal">?</a>)',
501501 'tog-justify' => 'Justify paragraphs',
502502 'tog-hideminor' => 'Hide minor edits in recent changes',
503 -'tog-rc_hidebots' => 'Hide bot edits in recent changes',
504 -'tog-newpageshidebots' => 'Hide bot edits from new page list',
505503 'tog-hidepatrolled' => 'Hide patrolled edits in recent changes',
506504 'tog-newpageshidepatrolled' => 'Hide patrolled pages from new page list',
507 -'tog-rc_hideown' => 'Hide my own edits in recent changes',
508 -'tog-newpageshideown' => 'Hide my own edits from new page list',
509505 'tog-extendwatchlist' => 'Expand watchlist to show all changes, not just the most recent',
510506 'tog-usenewrc' => 'Enhanced recent changes (requires JavaScript)',
511507 'tog-numberheadings' => 'Auto-number headings',
Index: trunk/phase3/languages/messages/MessagesDe.php
@@ -327,12 +327,8 @@
328328 'tog-highlightbroken' => 'Links auf nicht vorhandene Seiten hervorheben <a href="" class="new">Beispiel</a> (Alternative: wie dieser<a href="" class="internal">?</a>)',
329329 'tog-justify' => 'Text als Blocksatz',
330330 'tog-hideminor' => 'Kleine Änderungen ausblenden',
331 -'tog-rc_hidebots' => 'Änderungen der Bots ausblenden',
332 -'tog-newpageshidebots' => 'Änderungen der Bots auf der Liste „Neue Seiten“ verbergen',
333331 'tog-hidepatrolled' => 'Kontrollierte Änderungen in den „Letzten Änderungen“ ausblenden',
334332 'tog-newpageshidepatrolled' => 'Kontrollierte Seiten auf der Liste „Neue Seiten“ verbergen',
335 -'tog-rc_hideown' => 'Eigene Änderungen in den „Letzten Änderungen“ ausblenden',
336 -'tog-newpageshideown' => 'Eigene Änderungen in der Liste „Neue Seiten“ verbergen',
337333 'tog-extendwatchlist' => 'Erweiterte Beobachtungsliste zur Anzeige aller Änderungen',
338334 'tog-usenewrc' => 'Erweiterte Darstellung (benötigt JavaScript)',
339335 'tog-numberheadings' => 'Überschriften automatisch nummerieren',
Index: trunk/phase3/RELEASE-NOTES
@@ -170,8 +170,6 @@
171171 * Special:AllPages: Move hardcoded styles from code to CSS
172172 * (bug 6092) Add parser function equivalents of {{REVISIONID}},
173173 {{REVISIONTIMESTAMP}} (and friends) and {{REVISIONUSER}} magic words
174 -* (bug 7039) Show/hide bots/own edits from Recentchanges via preferences
175 -* Show/hide bots/own edits from Newpage via preferences
176174
177175 === Bug fixes in 1.15 ===
178176 * (bug 16968) Special:Upload no longer throws useless warnings.

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r49646(bug 7039) Show/hide bots/own edits from Recentchanges via preferences...purodha18:43, 19 April 2009
r49647Follow up r49646: Add new message keys to messages.incraymond19:01, 19 April 2009
r49650Follow-up to r49646: Untested fix for the problem that bots are now not hidde...rotem20:30, 19 April 2009

Status & tagging log