On Tue, Mar 6, 2012 at 12:59 PM, Daniel Barrett <[email protected]> wrote: > Since moving to MediaWiki 1.18, several of our extensions that use namespaces > have broken in the following way. Any advice/explanation would be very much > appreciated! (I don't see anything in the release notes.) > > Some of our extensions contain logic like this: > > if ($wgTitle->getNamespace() == NS_FOO) { .... } > > The problem occurs when an article in the main namespace redirects to the Foo > namespace: > > #REDIRECT [[Foo:Bar]] > > When the user hits this redirect in 1.17 and earlier, the above test returned > True. In 1.18 it returns False, and I've had to replace it with more complex > logic to follow the redirect: > So I guess the real problem here is not related to namespaces at all, but it's that $wgTitle used to be set to the redirect target and it now set to the redirect itself?
Roan _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
