From: Roan Kattouw Date: Thu, 30 Oct 2008 14:36:05 +0000 (+0000) Subject: API: BREAKING CHANGE: Putting meta=siteinfo output in element for consiste... X-Git-Tag: 1.31.0-rc.0~44506 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=20dd6fdb02d44ccc42cc7d414107925f7bcd780f;p=lhc%2Fweb%2Fwiklou.git API: BREAKING CHANGE: Putting meta=siteinfo output in element for consistency with every other API module. Previously, it was just put in the element, where it doesn't belong. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 0582a7b1f6..e91546e7b0 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -379,6 +379,7 @@ The following extensions are migrated into MediaWiki 1.14: * (bug 16105) Image metadata attributes containing spaces result in invalid XML * (bug 16126) Added siprop=magicwords to meta=siteinfo * (bug 16159) Added wlshow=patrolled|!patrolled to list=watchlist +* Put meta=siteinfo output in element === Languages updated in 1.14 === diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index e0d045fa6b..5d03994e3c 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -120,7 +120,7 @@ class ApiQuerySiteinfo extends ApiQueryBase { $data['timezone'] = $tz; $data['timeoffset'] = $offset; - $this->getResult()->addValue( 'query', $property, $data ); + $this->getResult()->addValue( array( 'query', $this->getModuleName() ), $property, $data ); } protected function appendNamespaces( $property ) { @@ -137,7 +137,7 @@ class ApiQuerySiteinfo extends ApiQueryBase { } $this->getResult()->setIndexedTagName( $data, 'ns' ); - $this->getResult()->addValue( 'query', $property, $data ); + $this->getResult()->addValue( array( 'query', $this->getModuleName() ), $property, $data ); } protected function appendNamespaceAliases( $property ) { @@ -152,7 +152,7 @@ class ApiQuerySiteinfo extends ApiQueryBase { } $this->getResult()->setIndexedTagName( $data, 'ns' ); - $this->getResult()->addValue( 'query', $property, $data ); + $this->getResult()->addValue( array( 'query', $this->getModuleName() ), $property, $data ); } protected function appendSpecialPageAliases( $property ) { @@ -165,7 +165,7 @@ class ApiQuerySiteinfo extends ApiQueryBase { $data[] = $arr; } $this->getResult()->setIndexedTagName( $data, 'specialpage' ); - $this->getResult()->addValue( 'query', $property, $data ); + $this->getResult()->addValue( array( 'query', $this->getModuleName() ), $property, $data ); } protected function appendMagicWords( $property ) { @@ -181,7 +181,7 @@ class ApiQuerySiteinfo extends ApiQueryBase { $data[] = $arr; } $this->getResult()->setIndexedTagName($data, 'magicword'); - $this->getResult()->addValue('query', $property, $data); + $this->getResult()->addValue( array( 'query', $this->getModuleName() ), $property, $data ); } @@ -220,7 +220,7 @@ class ApiQuerySiteinfo extends ApiQueryBase { $db->freeResult( $res ); $this->getResult()->setIndexedTagName( $data, 'iw' ); - $this->getResult()->addValue( 'query', $property, $data ); + $this->getResult()->addValue( array( 'query', $this->getModuleName() ), $property, $data ); } protected function appendDbReplLagInfo( $property, $includeAll ) { @@ -246,9 +246,8 @@ class ApiQuerySiteinfo extends ApiQueryBase { ); } - $result = $this->getResult(); - $result->setIndexedTagName( $data, 'db' ); - $result->addValue( 'query', $property, $data ); + $this->getResult()->setIndexedTagName( $data, 'db' ); + $this->getResult()->addValue( array( 'query', $this->getModuleName() ), $property, $data ); } protected function appendStatistics( $property ) { @@ -262,7 +261,7 @@ class ApiQuerySiteinfo extends ApiQueryBase { $data['activeusers'] = intval( SiteStats::activeUsers() ); $data['admins'] = intval( SiteStats::numberingroup('sysop') ); $data['jobs'] = intval( SiteStats::jobs() ); - $this->getResult()->addValue( 'query', $property, $data ); + $this->getResult()->addValue( array( 'query', $this->getModuleName() ), $property, $data ); } protected function appendUserGroups( $property ) { @@ -275,7 +274,7 @@ class ApiQuerySiteinfo extends ApiQueryBase { } $this->getResult()->setIndexedTagName( $data, 'group' ); - $this->getResult()->addValue( 'query', $property, $data ); + $this->getResult()->addValue( array( 'query', $this->getModuleName() ), $property, $data ); } public function getAllowedParams() {