From 25bf90b36326668a9cc934b974ecd7540621e744 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Sat, 20 Dec 2008 23:20:15 +0000 Subject: [PATCH] API: (bug 16726) siprop=namespacealiases should also list localized aliases --- RELEASE-NOTES | 3 ++- includes/api/ApiQuerySiteinfo.php | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 93f171a9a6..e55bca0779 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -542,7 +542,8 @@ The following extensions are migrated into MediaWiki 1.14: property for hidden categories * New siprop parameter of 'extensions' to list all installed extensions * (bug 16672) Include canonical namespace name in - meta=siteinfo&siprop=namespaces. + meta=siteinfo&siprop=namespaces. +* (bug 16726) siprop=namespacealiases should also list localized aliases === Languages updated in 1.14 === diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index 06c5fc53a5..326f4fc68f 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -149,9 +149,11 @@ class ApiQuerySiteinfo extends ApiQueryBase { } protected function appendNamespaceAliases( $property ) { - global $wgNamespaceAliases; + global $wgNamespaceAliases, $wgLang; + $wgLang->load(); + $aliases = array_merge($wgNamespaceAliases, $wgLang->namespaceAliases); $data = array(); - foreach( $wgNamespaceAliases as $title => $ns ) { + foreach( $aliases as $title => $ns ) { $item = array( 'id' => $ns ); -- 2.20.1