diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2014-12-27 15:41:37 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2014-12-31 11:43:28 +0100 |
commit | c1f9b1f7b1b77776192048005dcc66dcf3df2bfb (patch) | |
tree | 2b38796e738dd74cb42ecd9bfd151803108386bc /includes/api/ApiQueryFileRepoInfo.php | |
parent | b88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff) |
Update to MediaWiki 1.24.1
Diffstat (limited to 'includes/api/ApiQueryFileRepoInfo.php')
-rw-r--r-- | includes/api/ApiQueryFileRepoInfo.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/includes/api/ApiQueryFileRepoInfo.php b/includes/api/ApiQueryFileRepoInfo.php index 3a353533..d1600efe 100644 --- a/includes/api/ApiQueryFileRepoInfo.php +++ b/includes/api/ApiQueryFileRepoInfo.php @@ -29,16 +29,13 @@ */ class ApiQueryFileRepoInfo extends ApiQueryBase { - public function __construct( $query, $moduleName ) { + public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'fri' ); } protected function getInitialisedRepoGroup() { $repoGroup = RepoGroup::singleton(); - - if ( !$repoGroup->reposInitialised ) { - $repoGroup->initialiseRepos(); - } + $repoGroup->initialiseRepos(); return $repoGroup; } @@ -55,7 +52,7 @@ class ApiQueryFileRepoInfo extends ApiQueryBase { $repos[] = array_intersect_key( $repo->getInfo(), $props ); } ); - $repos[] = array_intersect_key( $repoGroup->localRepo->getInfo(), $props ); + $repos[] = array_intersect_key( $repoGroup->getLocalRepo()->getInfo(), $props ); $result = $this->getResult(); $result->setIndexedTagName( $repos, 'repo' ); @@ -86,16 +83,19 @@ class ApiQueryFileRepoInfo extends ApiQueryBase { $props = array_merge( $props, array_keys( $repo->getInfo() ) ); } ); - return array_values( array_unique( array_merge( $props, array_keys( $repoGroup->localRepo->getInfo() ) ) ) ); + return array_values( array_unique( array_merge( + $props, + array_keys( $repoGroup->getLocalRepo()->getInfo() ) + ) ) ); } public function getParamDescription() { - $p = $this->getModulePrefix(); 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.', + ' 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.', |