Index: trunk/phase3/includes/api/ApiQueryRecentChanges.php |
— | — | @@ -620,7 +620,7 @@ |
621 | 621 | 'type' => 'Which types of changes to show', |
622 | 622 | 'limit' => 'How many total changes to return', |
623 | 623 | 'tag' => 'Only list changes tagged with this tag', |
624 | | - 'toponly' => 'Only list changes which are the latest revision' |
| 624 | + 'toponly' => 'Only list changes which are the latest revision', |
625 | 625 | ); |
626 | 626 | } |
627 | 627 | |
Index: trunk/phase3/includes/api/ApiQueryUserContributions.php |
— | — | @@ -81,6 +81,7 @@ |
82 | 82 | $this->prefixMode = false; |
83 | 83 | $this->multiUserMode = ( count( $this->params['user'] ) > 1 ); |
84 | 84 | } |
| 85 | + |
85 | 86 | $this->prepareQuery(); |
86 | 87 | |
87 | 88 | // Do the actual query. |
— | — | @@ -264,6 +265,10 @@ |
265 | 266 | $index['change_tag'] = $wgOldChangeTagsIndex ? 'ct_tag' : 'change_tag_tag_id'; |
266 | 267 | } |
267 | 268 | |
| 269 | + if ( $this->params['toponly'] ) { |
| 270 | + $this->addWhere( 'rev_id = page_latest' ); |
| 271 | + } |
| 272 | + |
268 | 273 | $this->addOption( 'USE INDEX', $index ); |
269 | 274 | } |
270 | 275 | |
— | — | @@ -409,6 +414,7 @@ |
410 | 415 | ) |
411 | 416 | ), |
412 | 417 | 'tag' => null, |
| 418 | + 'toponly' => false, |
413 | 419 | ); |
414 | 420 | } |
415 | 421 | |
— | — | @@ -439,6 +445,7 @@ |
440 | 446 | 'show' => array( "Show only items that meet this criteria, e.g. non minor edits only: {$p}show=!minor", |
441 | 447 | "NOTE: if {$p}show=patrolled or {$p}show=!patrolled is set, revisions older than $wgRCMaxAge won\'t be shown", ), |
442 | 448 | 'tag' => 'Only list revisions tagged with this tag', |
| 449 | + 'toponly' => 'Only list changes which are the latest revision', |
443 | 450 | ); |
444 | 451 | } |
445 | 452 | |
Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -758,7 +758,7 @@ |
759 | 759 | /** |
760 | 760 | * Get the Database object in use |
761 | 761 | * |
762 | | - * @return Database |
| 762 | + * @return DatabaseBase |
763 | 763 | */ |
764 | 764 | public function getDatabase() { |
765 | 765 | return $this->mDb; |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -333,6 +333,7 @@ |
334 | 334 | PARAM_TYPE is not set |
335 | 335 | * (bug 27712) add parent_id to list=deletedrevs |
336 | 336 | * (bug 28455) Add 'toponly' to recentchanges API module |
| 337 | +* (bug 26873) API: Add 'toponly' filter in usercontribs module |
337 | 338 | |
338 | 339 | === Languages updated in 1.18 === |
339 | 340 | |