diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:12:12 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:12:12 -0400 |
commit | c9aa36da061816dee256a979c2ff8d2ee41824d9 (patch) | |
tree | 29f7002b80ee984b488bd047dbbd80b36bf892e9 /includes/api/ApiQueryFileRepoInfo.php | |
parent | b4274e0e33eafb5e9ead9d949ebf031a9fb8363b (diff) | |
parent | d1ba966140d7a60cd5ae4e8667ceb27c1a138592 (diff) |
Merge branch 'archwiki'
# Conflicts:
# skins/ArchLinux.php
# skins/ArchLinux/archlogo.gif
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.', |