* (bug 16672) Add canonical parameter to meta=siteinfo&siprop=namespaces|namespaceali...
authorX! <soxred93@users.mediawiki.org>
Tue, 16 Dec 2008 17:19:05 +0000 (17:19 +0000)
committerX! <soxred93@users.mediawiki.org>
Tue, 16 Dec 2008 17:19:05 +0000 (17:19 +0000)
RELEASE-NOTES
includes/api/ApiQuerySiteinfo.php

index 58f313f..74ce542 100644 (file)
@@ -233,6 +233,7 @@ 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 und Special:Log
+* (bug 16672) Add canonical parameter to meta=siteinfo&siprop=namespaces|namespacealiases. 
 
 === Bug fixes in 1.14 ===
 
index 3610e27..c92272a 100644 (file)
@@ -135,8 +135,13 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                                'id' => $ns
                        );
                        ApiResult :: setContent( $data[$ns], $title );
-                       if( MWNamespace::hasSubpages($ns) )
+                       $canonical = Namespace::getCanonicalName( $ns );
+                       
+                       if( MWNamespace::hasSubpages( $ns ) )
                                $data[$ns]['subpages'] = '';
+                       
+                       if( $canonical ) 
+                               $data[$ns]['canonical'] = $canonical;
                }
 
                $this->getResult()->setIndexedTagName( $data, 'ns' );