);
$mainPage = Title::newMainPage();
- // Build wgNamespaceIds
- // A complete key-value pair object mapping localized, canonical and aliases for namespaces
- // to their numerical ids (case insensitive and with underscores)
+ /**
+ * Namespace related preparation
+ * - wgNamespaceIds: Key-value pairs of all localized, canonical and aliases for namespaces.
+ * - wgCaseSensitiveNamespaces: Array of namespaces that are case-sensitive.
+ */
$namespaceIds = $wgContLang->getNamespaceIds();
+ $caseSensitiveNamespaces = array();
foreach( MWNamespace::getCanonicalNamespaces() as $index => $name ) {
$namespaceIds[$wgContLang->lc( $name )] = $index;
+ if ( !MWNamespace::isCapitalized( $index ) ) {
+ $caseSensitiveNamespaces[] = $index;
+ }
}
+
$serverBits = wfParseUrl( $wgServer );
$protocol = $serverBits ? $serverBits['scheme'] : 'http';
'wgCookiePrefix' => $wgCookiePrefix,
'wgResourceLoaderMaxQueryLength' => $wgResourceLoaderMaxQueryLength,
'wgLegacyJavaScriptGlobals' => $wgLegacyJavaScriptGlobals,
+ 'wgCaseSensitiveNamespaces' => $caseSensitiveNamespaces,
);
if ( $wgUseAjax && $wgEnableMWSuggest ) {
$vars['wgMWSuggestTemplate'] = SearchEngine::getMWSuggestTemplate();
public function getGroup() {
return 'startup';
}
-}
\ No newline at end of file
+}