Make imagelinks work like templatelinks
authorBrad Jorsch <bjorsch@wikimedia.org>
Sat, 4 Jan 2014 19:26:26 +0000 (14:26 -0500)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 7 Jan 2014 23:13:43 +0000 (23:13 +0000)
commita2120b0bd0fed4dba09204f0bb2c4e477ac5b657
tree22cd3289e4c764c08a29f57271bce63994558da9
parent09f84556bd33d2eeca29cf0d01b641030f50fb8a
Make imagelinks work like templatelinks

Due to bug 17259 (which is fixed in a better way in Id44d566a),
imagelinks only records the redirect and not the actual image used when
an image redirect is referenced. This causes various problems, such as
cascading protection not working through image redirects.

It makes more sense for imagelinks to work like tempaltelinks, recording
both so that things like cascading protection don't have to care about
image redirects explicitly.

Comparing imagelinks to templatelinks also reveals a few places
(WikiPage::doDeleteUpdates, WikiPage::doCascadeProtectionUpdates) that
should be triggering a LinksUpdate if the image links changed.

Bug: 23002
Bug: 23542
Bug: 26503
Change-Id: I64fe7d25646cae2c8213211893c6f821f3504dbf
RELEASE-NOTES-1.23
includes/WikiPage.php
includes/deferred/LinksUpdate.php
includes/filerepo/file/LocalFile.php
includes/parser/Parser.php