Page MenuHomePhabricator

Add 'fromsection' and 'tosection' to action=compare
Closed, DeclinedPublic


The diffing in ApiQueryRevisionsBase that was deprecated in T164106 used the rvsection option, ApiComparePages should have an equivalent so things using that functionality can be migrated.


Related Gerrit Patches:

Event Timeline

Anomie created this task.Dec 30 2017, 5:54 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 30 2017, 5:54 PM

Change 401090 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] ApiComparePages: Add 'fromsection' and 'tosection' parameters

Od1n awarded a token.Dec 30 2017, 6:47 PM
Anomie moved this task from Unsorted to Needs Review on the MediaWiki-API board.Jan 2 2018, 3:28 PM

Change 401090 merged by jenkins-bot:
[mediawiki/core@master] ApiComparePages: Add 'fromsection' and 'tosection' parameters

Anomie closed this task as Resolved.Jan 4 2018, 5:17 PM

The new parameters should be deployed to WMF wikis with 1.31.0-wmf.16 or later. See for the schedule.

Change 448160 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] ApiComparePages: Update for MCR

Anomie changed the task status from Resolved to Declined.Jul 26 2018, 9:51 PM

After further consideration, this was a bad idea. We should have had fromsection and tosection work more like the section parameter to action=edit, expanding the fromtext/totext as if for a section edit and then doing a whole-page diff as requested in T185723: Compare full pages at section API diffs.

Since T174032: Make relevant API modules aware of MCR means we have to deprecate fromsection and tosection anyway in favor of per-slot versions, I'm going to have the new per-slot versions have the expansion behavior instead of the extraction behavior requested here.

Change 448160 merged by jenkins-bot:
[mediawiki/core@master] ApiComparePages: Update for MCR