Index: trunk/phase3/includes/User.php |
— | — | @@ -53,6 +53,10 @@ |
54 | 54 | 'highlightbroken', |
55 | 55 | 'justify', |
56 | 56 | 'hideminor', |
| 57 | + 'rc_hidebots', |
| 58 | + 'rc_hideown', |
| 59 | + 'newpageshidebots', |
| 60 | + 'newpageshideown', |
57 | 61 | 'extendwatchlist', |
58 | 62 | 'usenewrc', |
59 | 63 | 'numberheadings', |
Index: trunk/phase3/includes/specials/SpecialNewpages.php |
— | — | @@ -25,7 +25,8 @@ |
26 | 26 | $this->opts = $opts; // bind |
27 | 27 | $opts->add( 'hideliu', false ); |
28 | 28 | $opts->add( 'hidepatrolled', $wgUser->getBoolOption( 'newpageshidepatrolled' ) ); |
29 | | - $opts->add( 'hidebots', false ); |
| 29 | + $opts->add( 'hidebots', $wgUser->getBoolOption( 'newpageshidebots' ) ); |
| 30 | + $opts->add( 'hideown', $wgUser->getBoolOption( 'newpageshideown' ) ); |
30 | 31 | $opts->add( 'hideredirs', true ); |
31 | 32 | $opts->add( 'limit', (int)$wgUser->getOption( 'rclimit' ) ); |
32 | 33 | $opts->add( 'offset', '' ); |
— | — | @@ -60,6 +61,8 @@ |
61 | 62 | $this->opts->setValue( 'hidepatrolled', true ); |
62 | 63 | if ( 'hidebots' == $bit ) |
63 | 64 | $this->opts->setValue( 'hidebots', true ); |
| 65 | + if ( 'hideown' == $bit ) |
| 66 | + $this->opts->setValue( 'hideown', true ); |
64 | 67 | if ( 'showredirs' == $bit ) |
65 | 68 | $this->opts->setValue( 'hideredirs', false ); |
66 | 69 | if ( is_numeric( $bit ) ) |
— | — | @@ -132,6 +135,7 @@ |
133 | 136 | 'hideliu' => 'rcshowhideliu', |
134 | 137 | 'hidepatrolled' => 'rcshowhidepatr', |
135 | 138 | 'hidebots' => 'rcshowhidebots', |
| 139 | + 'hideown' => 'rcshowhidemine', |
136 | 140 | 'hideredirs' => 'whatlinkshere-hideredirs' |
137 | 141 | ); |
138 | 142 | |
— | — | @@ -387,6 +391,7 @@ |
388 | 392 | |
389 | 393 | function getQueryInfo() { |
390 | 394 | global $wgEnableNewpagesUserFilter, $wgGroupPermissions, $wgUser; |
| 395 | + $dbr = wfGetDB( DB_SLAVE ); |
391 | 396 | $conds = array(); |
392 | 397 | $conds['rc_new'] = 1; |
393 | 398 | |
— | — | @@ -418,7 +423,13 @@ |
419 | 424 | if( $this->opts->getValue( 'hidebots' ) ) { |
420 | 425 | $conds['rc_bot'] = 0; |
421 | 426 | } |
422 | | - |
| 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 | + } |
423 | 434 | if ( $this->opts->getValue( 'hideredirs' ) ) { |
424 | 435 | $conds['page_is_redirect'] = 0; |
425 | 436 | } |
Index: trunk/phase3/includes/specials/SpecialPreferences.php |
— | — | @@ -1162,10 +1162,14 @@ |
1163 | 1163 | ); |
1164 | 1164 | |
1165 | 1165 | $toggles[] = 'hideminor'; |
| 1166 | + $toggles[] = 'rc_hidebots'; |
| 1167 | + $toggles[] = 'newpageshidebots'; |
1166 | 1168 | if( $wgUseRCPatrol ) { |
1167 | 1169 | $toggles[] = 'hidepatrolled'; |
1168 | 1170 | $toggles[] = 'newpageshidepatrolled'; |
1169 | 1171 | } |
| 1172 | + $toggles[] = 'rc_hideown'; |
| 1173 | + $toggles[] = 'newpageshideown'; |
1170 | 1174 | if( $wgRCShowWatchingUsers ) $toggles[] = 'shownumberswatching'; |
1171 | 1175 | $toggles[] = 'usenewrc'; |
1172 | 1176 | |
Index: trunk/phase3/includes/specials/SpecialRecentchanges.php |
— | — | @@ -24,11 +24,11 @@ |
25 | 25 | $opts->add( 'from', '' ); |
26 | 26 | |
27 | 27 | $opts->add( 'hideminor', $wgUser->getBoolOption( 'hideminor' ) ); |
28 | | - $opts->add( 'hidebots', true ); |
| 28 | + $opts->add( 'hidebots', $wgUser->getBoolOption( 'rc_hidebots' ) ); |
29 | 29 | $opts->add( 'hideanons', false ); |
30 | 30 | $opts->add( 'hideliu', false ); |
31 | 31 | $opts->add( 'hidepatrolled', $wgUser->getBoolOption( 'hidepatrolled' ) ); |
32 | | - $opts->add( 'hidemyself', false ); |
| 32 | + $opts->add( 'hidemyself', $wgUser->getBoolOption( 'rc_hideown' ) ); |
33 | 33 | |
34 | 34 | $opts->add( 'namespace', '', FormOptions::INTNULL ); |
35 | 35 | $opts->add( 'invert', false ); |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -499,8 +499,12 @@ |
500 | 500 | 'tog-highlightbroken' => 'Format broken links <a href="" class="new">like this</a> (alternative: like this<a href="" class="internal">?</a>)', |
501 | 501 | 'tog-justify' => 'Justify paragraphs', |
502 | 502 | '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', |
503 | 505 | 'tog-hidepatrolled' => 'Hide patrolled edits in recent changes', |
504 | 506 | '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', |
505 | 509 | 'tog-extendwatchlist' => 'Expand watchlist to show all changes, not just the most recent', |
506 | 510 | 'tog-usenewrc' => 'Enhanced recent changes (requires JavaScript)', |
507 | 511 | 'tog-numberheadings' => 'Auto-number headings', |
Index: trunk/phase3/languages/messages/MessagesDe.php |
— | — | @@ -327,8 +327,12 @@ |
328 | 328 | 'tog-highlightbroken' => 'Links auf nicht vorhandene Seiten hervorheben <a href="" class="new">Beispiel</a> (Alternative: wie dieser<a href="" class="internal">?</a>)', |
329 | 329 | 'tog-justify' => 'Text als Blocksatz', |
330 | 330 | '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', |
331 | 333 | 'tog-hidepatrolled' => 'Kontrollierte Änderungen in den „Letzten Änderungen“ ausblenden', |
332 | 334 | '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', |
333 | 337 | 'tog-extendwatchlist' => 'Erweiterte Beobachtungsliste zur Anzeige aller Änderungen', |
334 | 338 | 'tog-usenewrc' => 'Erweiterte Darstellung (benötigt JavaScript)', |
335 | 339 | 'tog-numberheadings' => 'Überschriften automatisch nummerieren', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -170,6 +170,8 @@ |
171 | 171 | * Special:AllPages: Move hardcoded styles from code to CSS |
172 | 172 | * (bug 6092) Add parser function equivalents of {{REVISIONID}}, |
173 | 173 | {{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 |
174 | 176 | |
175 | 177 | === Bug fixes in 1.15 === |
176 | 178 | * (bug 16968) Special:Upload no longer throws useless warnings. |