r44683 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44682‎ | r44683 | r44684 >
Date:19:59, 16 December 2008
Author:mrzman
Status:ok (Comments)
Tags:
Comment:
Fix for r44676, fix E_NOTICE from having no canonical name associated with a namespace (ns 0), move RELEASE-NOTES entry to API section and clarify.
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
@@ -127,7 +127,7 @@
128128 }
129129
130130 protected function appendNamespaces( $property ) {
131 - global $wgContLang;
 131+ global $wgContLang, $wgCanonicalNamespaceNames;
132132 $data = array();
133133 foreach( $wgContLang->getFormattedNamespaces() as $ns => $title )
134134 {
@@ -135,7 +135,7 @@
136136 'id' => $ns
137137 );
138138 ApiResult :: setContent( $data[$ns], $title );
139 - $canonical = Namespace::getCanonicalName( $ns );
 139+ $canonical = isset($wgCanonicalNamespaceNames[$ns]) ? $wgCanonicalNamespaceNames[$ns] : false;
140140
141141 if( MWNamespace::hasSubpages( $ns ) )
142142 $data[$ns]['subpages'] = '';
@@ -352,7 +352,7 @@
353353 'prop' => array(
354354 'Which sysinfo properties to get:',
355355 ' "general" - Overall system information',
356 - ' "namespaces" - List of registered namespaces (localized)',
 356+ ' "namespaces" - List of registered namespaces and their canonical names',
357357 ' "namespacealiases" - List of registered namespace aliases',
358358 ' "specialpagealiases" - List of special page aliases',
359359 ' "magicwords" - List of magic words and their aliases',
Index: trunk/phase3/RELEASE-NOTES
@@ -233,7 +233,6 @@
234234 * (bug 7492) Rights can now be assigned to specific IP addresses and ranges by
235235 using $wgAutopromote (new defines: APCOND_ISIP and APCOND_IPINRANGE)
236236 * Add a 'change block' link to Special:IPBlockList and Special:Log
237 -* (bug 16672) Add canonical parameter to meta=siteinfo&siprop=namespaces|namespacealiases.
238237
239238 === Bug fixes in 1.14 ===
240239
@@ -531,6 +530,7 @@
532531 * (bug 16647) list=allcategories, prop=categories don't return "hidden"
533532 property for hidden categories
534533 * New siprop parameter of 'extensions' to list all installed extensions
 534+* (bug 16672) Include canonical namespace name in meta=siteinfo&siprop=namespaces.
535535
536536 === Languages updated in 1.14 ===
537537

Follow-up revisions

RevisionCommit summaryAuthorDate
r44694Cleanup r44683 -- fix E_NOTICE bug in MWNamespace::getCanonicalName() instead...brion23:57, 16 December 2008

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r44676* (bug 16672) Add canonical parameter to meta=siteinfo&siprop=namespaces|name...soxred9317:19, 16 December 2008

Comments

#Comment by Brion VIBBER (talk | contribs)   23:57, 16 December 2008

Cleaned up in r44694

Status & tagging log