Last modified: 2011-11-30 12:44:05 UTC
This would make live (and coding) very much easier. When you got redirected, the only evidence for that is the html content of the contentSub element. Very ugly to detect by js in different skins and languages. Another possibility would be to give the <a> element in the contentSub an id, but I think the first approach is cleaner. Example where that could be needed? To hide Template:Redirect (and its interwiki equivalents) when you got *not* redirected.
Thanks for the request, Bergi. I'm removing the 1.18 tarball release milestone because I think this is not *urgent* enough for us to aim to fix it, review the code for the fix, and roll it out within the next couple of weeks (which is when we're trying to get the 1.18 tarball release out). However, per discussion with Daniel Friesen on IRC, it seems reasonable to aim for the 1.19 tarball release, so I've added that milestone instead.
$wgMaxRedirects allows to follow more than one redirects. A new JavaScript variable should contain an array of the redirected titles. The Array should be empty when there is no redirect.
If $wgMaxRedirects is set to a value > 1 still only one redirect is actually followed. The rest of the redirect chain (up to $wgMaxRedirects redirects) is shown to the visitor, but not followed.
Created attachment 9567 [details] patch against trunk Puts the "redirected from" pagetitle in mw.config.get('wgRedirectedFrom'). Usage example: if (window.mw.config.get('wgRedirectedFrom')) { alert(window.mw.config.get('wgRedirectedFrom')); }
Created attachment 9570 [details] Patch against trunk Using getPrefixedDBKey() instead of getPrefixedText().
I swear there's another bug for this where I updated someone else's patch, but MrBlueSky's patch on this bug is better.
*** Bug 11040 has been marked as a duplicate of this bug. ***
Patch committed in r104668.