r44860 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44859‎ | r44860 | r44861 >
Date:23:20, 20 December 2008
Author:catrope
Status:resolved (Comments)
Tags:
Comment:
API: (bug 16726) siprop=namespacealiases should also list localized aliases
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiQuerySiteinfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQuerySiteinfo.php
@@ -149,9 +149,11 @@
150150 }
151151
152152 protected function appendNamespaceAliases( $property ) {
153 - global $wgNamespaceAliases;
 153+ global $wgNamespaceAliases, $wgLang;
 154+ $wgLang->load();
 155+ $aliases = array_merge($wgNamespaceAliases, $wgLang->namespaceAliases);
154156 $data = array();
155 - foreach( $wgNamespaceAliases as $title => $ns ) {
 157+ foreach( $aliases as $title => $ns ) {
156158 $item = array(
157159 'id' => $ns
158160 );
Index: trunk/phase3/RELEASE-NOTES
@@ -542,7 +542,8 @@
543543 property for hidden categories
544544 * New siprop parameter of 'extensions' to list all installed extensions
545545 * (bug 16672) Include canonical namespace name in
546 - meta=siteinfo&siprop=namespaces.
 546+ meta=siteinfo&siprop=namespaces.
 547+* (bug 16726) siprop=namespacealiases should also list localized aliases
547548
548549 === Languages updated in 1.14 ===
549550

Follow-up revisions

RevisionCommit summaryAuthorDate
r44862Fix up r44860, use $wgContLang instead.catrope23:49, 20 December 2008

Comments

#Comment by Aaron Schulz (talk | contribs)   09:35, 21 December 2008

Clean up in r44862

Status & tagging log