(bug 41990) Fix regression in API edit of redirect
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 12 Nov 2012 05:42:26 +0000 (21:42 -0800)
committerReedy <reedy@wikimedia.org>
Mon, 12 Nov 2012 15:03:27 +0000 (15:03 +0000)
commitf6e8d4a04c1e661045498d6e6cb97e1625ef8967
treeb2a7cd7166ea2b2aaa997f71dfefa57052f3e7f7
parentd4d929b352ed4f0c6d8d1febe69f9aca9253209d
(bug 41990) Fix regression in API edit of redirect

Before ContentHandler, an API edit passing a redirect for title and
redirect=true and omitting basetimestamp would use the last revision
timestamp of the target page. When ContentHandler was merged, this was
accidentally changed to use the last revision timestamp of the redirect
page, which was likely much earlier than the target page's last revision
and so causes an edit conflict in almost all cases.

Some scripts took advantage of this along with appendtext to add notices
to users' talk pages, so restore that old behavior. We'll also adjust
the contentmodel/contentformat detection added by ContentHandler to use
the model and format of the target page rather than the redirect in this
case, as that seems more likely to be less wrong.

Change-Id: If0c674e26a4deb54ec14f0bf45418d666a397347
RELEASE-NOTES-1.21
includes/api/ApiEditPage.php