summaryrefslogtreecommitdiff
path: root/includes/api/ApiQueryFileRepoInfo.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/api/ApiQueryFileRepoInfo.php')
-rw-r--r--includes/api/ApiQueryFileRepoInfo.php27
1 files changed, 6 insertions, 21 deletions
diff --git a/includes/api/ApiQueryFileRepoInfo.php b/includes/api/ApiQueryFileRepoInfo.php
index d1600efe..9ad7e27e 100644
--- a/includes/api/ApiQueryFileRepoInfo.php
+++ b/includes/api/ApiQueryFileRepoInfo.php
@@ -55,7 +55,9 @@ class ApiQueryFileRepoInfo extends ApiQueryBase {
$repos[] = array_intersect_key( $repoGroup->getLocalRepo()->getInfo(), $props );
$result = $this->getResult();
- $result->setIndexedTagName( $repos, 'repo' );
+ ApiResult::setIndexedTagName( $repos, 'repo' );
+ ApiResult::setArrayTypeRecursive( $repos, 'assoc' );
+ ApiResult::setArrayType( $repos, 'array' );
$result->addValue( array( 'query' ), 'repos', $repos );
}
@@ -89,27 +91,10 @@ class ApiQueryFileRepoInfo extends ApiQueryBase {
) ) );
}
- public function getParamDescription() {
+ protected function getExamplesMessages() {
return array(
- 'prop' => array(
- 'Which repository properties to get (there may be more available on some wikis):',
- ' apiurl - URL to the repository API - helpful for getting image info from the host.',
- ' name - The key of the repository - used in e.g. ' .
- '$wgForeignFileRepos and imageinfo return values.',
- ' displayname - The human-readable name of the repository wiki.',
- ' rooturl - Root URL for image paths.',
- ' local - Whether that repository is the local one or not.',
- ),
- );
- }
-
- public function getDescription() {
- return 'Return meta information about image repositories configured on the wiki.';
- }
-
- public function getExamples() {
- return array(
- 'api.php?action=query&meta=filerepoinfo&friprop=apiurl|name|displayname',
+ 'action=query&meta=filerepoinfo&friprop=apiurl|name|displayname'
+ => 'apihelp-query+filerepoinfo-example-simple',
);
}
}