Make redirect update in refreshLinks.php bypass the redirect table
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Thu, 17 Jan 2013 09:51:35 +0000 (10:51 +0100)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Thu, 17 Jan 2013 09:51:35 +0000 (10:51 +0100)
commit591a275230625892eea81ea548e2e148ec15f875
treed6566f5e37a5106014328452957c49b607d1aec0
parent9d0e8dc2dc03f4466e75137ea65372875d1d7d79
Make redirect update in refreshLinks.php bypass the redirect table

This makes this script actually useful when updating namespaces by
making sure the target registred in the "redirect" is the correct one.

Consider the following example:

- Create a redirect page pointing to a page "Extra:Target"
- Add $wgExtraNamespaces[100] = 'Extra'; in LocalSettings.php
- run refreshLinks.php

Previously the redirect target of that page was not updated and still
pointing to (0, "Extra:Target") which no longer a valid title.
Now it will be updated correctly to point to (100, "Target").

The value of the page_is_redirect field will also be updated to be
sure it has the correct value, which might be wrong when the target
becomes valid or invalid, e.g. by changing $wgInvalidRedirectTargets.

Change-Id: I458ca63550df56ca96b35749daf4e7b866ab9d93
maintenance/refreshLinks.php