6

Found this gem a while ago that made my day

​ if ( $this->isExternal() ) {
​ // This probably shouldn't even happen. ohh man, oh yuck.
​ // But for interwiki transclusion it sometimes does.
​ // Shit. Shit shit shit.
​ //
​ // Use the canonical namespaces if possible to try to
​ // resolve a foreign namespace.
​ if ( MWNamespace::exists( $this->mNamespace ) ) {
​ return MWNamespace::getCanonicalName( $this->mNamespace );
​ }

In a not too old version for mediawiki, the codebase for Wikipedia.

https://phabricator.wikimedia.org/s...

Comments
Add Comment