From 32e4c61397af3aaa389eb6a460f11c59ef76fd8f Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 2 Dec 2013 10:52:10 -0800 Subject: [PATCH] Fixed api.php fatals due to protected field usage bug: 57865 Change-Id: Idafdc353c6b0a2fe6657b3887de4b9d6f1eb1dfd --- includes/api/ApiQueryFileRepoInfo.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/includes/api/ApiQueryFileRepoInfo.php b/includes/api/ApiQueryFileRepoInfo.php index 148c4ddde9..dffe3019cd 100644 --- a/includes/api/ApiQueryFileRepoInfo.php +++ b/includes/api/ApiQueryFileRepoInfo.php @@ -35,11 +35,7 @@ class ApiQueryFileRepoInfo extends ApiQueryBase { protected function getInitialisedRepoGroup() { $repoGroup = RepoGroup::singleton(); - - if ( !$repoGroup->reposInitialised ) { - $repoGroup->initialiseRepos(); - } - + $repoGroup->initialiseRepos(); return $repoGroup; } @@ -55,7 +51,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' ); @@ -88,7 +84,7 @@ class ApiQueryFileRepoInfo extends ApiQueryBase { return array_values( array_unique( array_merge( $props, - array_keys( $repoGroup->localRepo->getInfo() ) + array_keys( $repoGroup->getLocalRepo()->getInfo() ) ) ) ); } -- 2.20.1