Fix for r44676, fix E_NOTICE from having no canonical name associated with a namespac...
authorAlex Z <mrzman@users.mediawiki.org>
Tue, 16 Dec 2008 19:59:37 +0000 (19:59 +0000)
committerAlex Z <mrzman@users.mediawiki.org>
Tue, 16 Dec 2008 19:59:37 +0000 (19:59 +0000)
RELEASE-NOTES
includes/api/ApiQuerySiteinfo.php

index 37a15fe..a0524ca 100644 (file)
@@ -233,7 +233,6 @@ The following extensions are migrated into MediaWiki 1.14:
 * (bug 7492) Rights can now be assigned to specific IP addresses and ranges by
   using $wgAutopromote (new defines: APCOND_ISIP and APCOND_IPINRANGE)
 * Add a 'change block' link to Special:IPBlockList and Special:Log
-* (bug 16672) Add canonical parameter to meta=siteinfo&siprop=namespaces|namespacealiases. 
 
 === Bug fixes in 1.14 ===
 
@@ -531,6 +530,7 @@ The following extensions are migrated into MediaWiki 1.14:
 * (bug 16647) list=allcategories, prop=categories don't return "hidden"
   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. 
 
 === Languages updated in 1.14 ===
 
index c92272a..8c7aee3 100644 (file)
@@ -127,7 +127,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
        }
 
        protected function appendNamespaces( $property ) {
-               global $wgContLang;
+               global $wgContLang, $wgCanonicalNamespaceNames;
                $data = array();
                foreach( $wgContLang->getFormattedNamespaces() as $ns => $title )
                {
@@ -135,7 +135,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                                'id' => $ns
                        );
                        ApiResult :: setContent( $data[$ns], $title );
-                       $canonical = Namespace::getCanonicalName( $ns );
+                       $canonical = isset($wgCanonicalNamespaceNames[$ns]) ? $wgCanonicalNamespaceNames[$ns] : false;
                        
                        if( MWNamespace::hasSubpages( $ns ) )
                                $data[$ns]['subpages'] = '';
@@ -352,7 +352,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                        'prop' => array(
                                'Which sysinfo properties to get:',
                                ' "general"      - Overall system information',
-                               ' "namespaces"   - List of registered namespaces (localized)',
+                               ' "namespaces"   - List of registered namespaces and their canonical names',
                                ' "namespacealiases" - List of registered namespace aliases',
                                ' "specialpagealiases" - List of special page aliases',
                                ' "magicwords"   - List of magic words and their aliases',