From 72f46fb64bcbf9db02a6bf4f9eb15231b673a6f0 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 3 Jul 2005 06:44:53 +0000 Subject: [PATCH] * Restore compatibility namespace aliases for French Wikipedia reverts change from revision 1.117 --- RELEASE-NOTES | 2 ++ languages/LanguageFr.php | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index e95385bad1..933b3a02d2 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -450,6 +450,8 @@ of MediaWiki:Newpagetext) to &action=edit, if page is new. * (bug 2658) Fix signature time, localtime to match timezone offset again * Files from shared repositories (e.g. commons) now display with their image description pages when viewed on local wikis. +* Restore compatibility namespace aliases for French Wikipedia + === Caveats === diff --git a/languages/LanguageFr.php b/languages/LanguageFr.php index d1d1835a86..ec9dbe3182 100644 --- a/languages/LanguageFr.php +++ b/languages/LanguageFr.php @@ -1360,6 +1360,20 @@ class LanguageFr extends LanguageUtf8 { return $wgNamespaceNamesFr; } + + function getNsIndex( $text ) { + global $wgNamespaceNamesFr, $wgSitename; + + foreach ( $wgNamespaceNamesFr as $i => $n ) { + if ( 0 == strcasecmp( $n, $text ) ) { return $i; } + } + if( $wgSitename == "Wikipédia" ) { + if( 0 == strcasecmp( "Wikipedia", $text ) ) return 4; + if( 0 == strcasecmp( "Discussion_Wikipedia", $text ) ) return 5; + } + return false; + } + function getQuickbarSettings() { global $wgQuickbarSettingsFr; return $wgQuickbarSettingsFr; -- 2.20.1