Page MenuHomePhabricator

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

Description

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.

Event Timeline

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

https://gerrit.wikimedia.org/r/401090

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

https://gerrit.wikimedia.org/r/401090

The new parameters should be deployed to WMF wikis with 1.31.0-wmf.16 or later. See https://www.mediawiki.org/wiki/MediaWiki_1.31/Roadmap for the schedule.

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

https://gerrit.wikimedia.org/r/448160

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

https://gerrit.wikimedia.org/r/448160