From: X! Date: Tue, 16 Dec 2008 17:19:05 +0000 (+0000) Subject: * (bug 16672) Add canonical parameter to meta=siteinfo&siprop=namespaces|namespaceali... X-Git-Tag: 1.31.0-rc.0~43934 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=5bf752ee6af92b316b08431bcb633e7a63316723;p=lhc%2Fweb%2Fwiklou.git * (bug 16672) Add canonical parameter to meta=siteinfo&siprop=namespaces|namespacealiases. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 58f313faad..74ce5420e3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index 3610e27d80..c92272aeda 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -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' );