This is inspired by the github approach, with some adjustments,
simplifications and improvements. This approach should be supported by
all grade C browsers, except for Firefox 27-51. As such, it seems the
best solution until we can use the grid layout (T270775).
The boilerplate code for the new module was shamelessly stolen from
Ied858465c2e938828fc146880827acb6aa15fdd6.
Also noting here for posterity: this will NOT work in WMF servers (beta
or prod), since we use wikidiff2 to generate diffs there.
Bug: T285956
Change-Id: I0cb5f10254af78043b0f6250f7695c6b962fbf6b
Results in passing a user where previously the fallback
to $wgUser was being used, mostly in tests.
Bug: T255507
Change-Id: Iabe24315b23c0ad1272353186425e71974528d23
Added timestamp props to ApiComparePages.php with value setting only
occuring when getTimestamp() does not return null. Added Appropriate
tests to ApiComparePagesTest.php
Bug: T247686
Change-Id: I15523d11741786f3c5d572a6cff79aef787af78f
The immediate use case is for testing, where some tests need to use the
PHP implementation even when wikidiff2 is installed.
Bug: T237049
Change-Id: I41dc4c0933429065d7638f518ec31f0a056afc41
RevisionStore::getPreviousRevision() and ::getNextRevision() don't
handle being passed a RevisionArchiveRecord very well. Even if they
would, it's not clear whether the user wants to be comparing with the
next/previous deleted revision or the next/previous revision even if not
deleted. So let's just make it an error, at least for now.
Bug: T208929
Change-Id: I151019e336bda92aa4040ba4162eb2588c909652
Prior to I700edfa76, torelative=prev on the first revision of a page
would "diff" from an empty revision, and torelative=next on the latest
revision would diff to that same latest revision. People were depending
on that behavior, so restore it.
Bug: T203433
Change-Id: Ie81b58c196998a8047322740fe1d1fa44eff8526
We can't allow the main slot to be deleted. DifferenceEngine assumes it
exits.
We also shouldn't allow parameters such as `tosection-{role}` to be used
without the corresponing `totext-{role}`. This will help prevent people
from being confused into thinking that `tosection-{role}` will do
anything in that situation (as opposed to `tosection`, which did).
Bug: T203255
Change-Id: I58573bb2c1ee68e6907ef2e88385fe36e5184076
The main external change here is that it can now return diffs per slot,
and the various parameters for providing text are deprecated in favor of
templated per-slot versions.
Also, this deprecates the 'fromsection' and 'tosection' behavior
introduced for T183823 (extracting a section's content for the diff) in
favor of the more logical behavior requested in T185723 (expanding
'fromtext-{slot}'/'totext-{slot}' as if for a section edit).
Bug: T200569
Bug: T183823
Bug: T185723
Change-Id: I700edfa766bbc320887f2e0b7507fcdb11e72cdc
Find: /isset\(\s*([^()]+?)\s*\)\s*\?\s*\1\s*:\s*/
Replace with: '\1 ?? '
(Everywhere except includes/PHPVersionCheck.php)
(Then, manually fix some line length and indentation issues)
Then manually reviewed the replacements for cases where confusing
operator precedence would result in incorrect results
(fixing those in I478db046a1cc162c6767003ce45c9b56270f3372).
Change-Id: I33b421c8cb11cdd4ce896488c9ff5313f03a38cf
Clean up use of @codingStandardsIgnore
- @codingStandardsIgnoreFile -> phpcs:ignoreFile
- @codingStandardsIgnoreLine -> phpcs:ignore
- @codingStandardsIgnoreStart -> phpcs:disable
- @codingStandardsIgnoreEnd -> phpcs:enable
For phpcs:disable always the necessary sniffs are provided.
Some start/end pairs are changed to line ignore
Change-Id: I92ef235849bcc349c69e53504e664a155dd162c8
The deprecated diffing in prop=revisions and such used a 'rvsection'
parameter. To enable migration of things using that, action=compare
needs corresponding section parameters.
Bug: T183823
Change-Id: If1a0e2df614c083b37640418c69cca367ce0e895
Support diffing deleted revisions, user-supplied text, and additional
properties about the diffed revisions such as the user and edit summary.
Bug: T20189
Bug: T30047
Bug: T164529
Change-Id: I5565d717d9c2fd19da7cae02890a15e244cc238b