From d247d88f7d26e4b507bd7e84bfd71d39b07d6b43 Mon Sep 17 00:00:00 2001 From: Ilmari Karonen Date: Thu, 27 Nov 2008 20:27:05 +0000 Subject: [PATCH] (bug 44) make 'Image' and 'Image_talk' compatibility aliases work for all languages, not just English --- includes/Setup.php | 8 ++++++++ languages/messages/MessagesEn.php | 5 +---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/includes/Setup.php b/includes/Setup.php index 6f94c4f0ec..cfb6a73a97 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -67,6 +67,14 @@ if ( empty( $wgFileStore['deleted']['directory'] ) ) { */ $wgNamespaceProtection[NS_MEDIAWIKI] = 'editinterface'; +/** + * The canonical names of namespaces 6 and 7 are, as of v1.14, "File" + * and "File_talk". The old names "Image" and "Image_talk" are + * retained as aliases for backwards compatibility. + */ +$wgNamespaceAliases['Image'] = NS_IMAGE; +$wgNamespaceAliases['Image_talk'] = NS_IMAGE_TALK; + /** * Initialise $wgLocalFileRepo from backwards-compatible settings */ diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 2284cf209c..005c9a1861 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -101,10 +101,7 @@ $namespaceNames = array( /** * Array of namespace aliases, mapping from name to NS_xxx index */ -$namespaceAliases = array( - 'Image' => NS_IMAGE, - 'Image_talk' => NS_IMAGE_TALK, -); +$namespaceAliases = array(); /** * Skin names. If any key is not specified, the English one will be used. -- 2.20.1