Last modified: 2013-09-16 02:38:17 UTC
There should be some sort of "wgIsRedirect":true/false in mw.config to find out if page is (not) redirect.
I'd prefer something like "wgRedirectTarget": false if the page is not a redirect, and the title of the target if it is. In boolean context this will evaluate to true for redirects, but additionally you have access to the target if you need it.
(In reply to comment #1) > I'd prefer something like "wgRedirectTarget": false if the page is not a > redirect, and the title of the target if it is. In boolean context this will > evaluate to true for redirects, but additionally you have access to the > target if you need it. Even better idea. It would be actually a complement to wgRedirectedFrom (bug 32230). So "wgRedirectTo" sounds as intuitive opposite.
wgIsRedirect variable exists now, added in I6e365f20b513ded10ede51d4b34de0736653a3dc by Timo.